
Using Regex to get a block of text
Good day every one:
I'm trying to get a bolck of text from a plain text file (.txt) using Regex,
the problem I'm having is, that the block of text I want is more than one
line of text, plus I don't really know how many rows there are in the block.
For example:
I'm tring to get everything between the rows that start with the "*03" and
end with the word "End*" here is an example of the file...
*03 blah blah blah blah blah blah blah blah
blah blah blah blah blah
blah blah blah blah blah
blah blah blah End*
Some more text goes here .............
*03 blah blah blah blah blah blah blah blah
blah blah blah blah blah
blah blah blah blah End*
More text .................
*03 blah blah blah blah blah blah blah blah
blah End*
How can I read these three blocks INCLUDING CR y LF?
I'm trying something like this, but it is not working...
mc = Regex.Matches(source, "\*03.+(?=End\*)")
Thanks in advance for all your help