Regex match a multiline record?

Using the . NET variety of RegEx, this should get you close.

Using the . NET variety of RegEx, this should get you close: (?LCD (.|\n(?! \r))* (?=\r\n\r\n|$) Join the lines together, of course.

Line 1 establishes you want to start your match immediately at the beginning of the string or where a new record begins. Line 2 matches the part of the record that can come before the found keyword. Any character can occur, but a \n should not be followed by a \r (as that would indicate the end of the record).

The question mark ensures the search is not greedy. Line 3 matches your keyword. Line 4 matches what occurs from the keyword until the end of the record.As before the keyword, this can be anything up to the end of the record.

Line 5 establishes what you expect to find after the end of Line 4--either the double line break or the end of the string.

(?\n\n))*(?=\n\n|$) – Kiruba Nov 1 at 5:47 Thanks man, You saved me. I tried from last 12 hours for this. You done it.

– Kiruba Nov 1 at 5:48.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions