Page 1 of 1

How to find/replace forward slashes and return?

Posted: Thu Mar 04, 2010 5:17 am
by JohnC
I have text that looks like this:
//

//

//

A pair of forward slashes, followed by a carriage return, repeated 2-3 times.

I want to the complete sequence from the file. The regular expression tester or replacer doesn't seem to work.

In the regex field, I try to find //\n or \/\/\n, but neither seems to work.

Posted: Thu Mar 04, 2010 1:51 pm
by DV
The above text is followed by two carriage returns? (line end, then a blank line)

(//\r\n\r\n)+

This works on the above sequence in the tester - of course your text file may only use \n (not \r\n) for newlines.