B4J Question regex split a textarea to line by line

Lego Jérôme

Member
Licensed User
I would like to retrieve each line of a textarea. (each line of line wrapping)

> This is my text area

i try this code :
B4X:
Dim lines() As String = Regex.Split2("[\r?\n]",25,cour.Text)

but in my log i just have 2 lines :
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…