I need to write a regular expression to group lines of text separated
by a blank line.
Ex.
Input:
line1
line2
line3
line 4
line 5
line 6
I tried turning on the MULTILINE and DOTALL flags and used the
following pattern:
(.+?)^$
which is close but prepends a newline to the 2nd and subsequent calls
to Matcher.find().
The first line of every paragraph is the same, if that helps.
Regex's are cool, but frustrating....
by a blank line.
Ex.
Input:
line1
line2
line3
line 4
line 5
line 6
I tried turning on the MULTILINE and DOTALL flags and used the
following pattern:
(.+?)^$
which is close but prepends a newline to the 2nd and subsequent calls
to Matcher.find().
The first line of every paragraph is the same, if that helps.
Regex's are cool, but frustrating....
Comment