I am trying to split a string to List where the delimiter is the $_$
.
For example the text Lorem ipsum dolor $$ sit amet, consectetur adipiscing $$ elit. Aliquam $_$ eu. I would like to convert to o list with elements
el1= Lorem ipsum dolor
el2= sit amet, consectetur adipiscing
el3- elit. Aliquam
el4= eu.
I tried the code bellow with no success.Is there any other way?
List<String> myList = new ArrayList<String>(Arrays.asList(s.split("$_$")));