How can I capture a multiline pattern using a regular expressions in java?
- by lampShade
I have a text file that I need to parse using regular expressions. The text that I need to capture is in multiline groups like this:
truck
zDoug
Doug's house
(123) 456-7890
Edoug@doug.com
30
61234.56
8/10/2003
vehicle
eRob
Rob's house
(987) 654-3210
Frob@rob.com
For this example I need to capture truck followed by the next seven lines.In other…