Page 1 of 1

Multiple lines

Posted: Fri Oct 23, 2015 5:09 pm
by allratings
What would be the proper expression to find and delete multiple lines? I am not talking about this....
Find=line1(.+)\n(.+)\nline4

I am talking about maybe 100s of lines where I want to delete the content from the two points and the line numbers are not always the same.

Example: This is on line 1 ....<!DOCTYPE html PUBLIC.+
This could be on line 212, 216, 229, etc.... <!--[if lte IE 6]><table><tr><td><![endif]-->

So I want to delete all in between.

Posted: Fri Oct 23, 2015 6:08 pm
by ben_josephs
The details are not clear, but this might do it:
Find what: (<!DOCTYPE html PUBLIC.+)(?:[\s\S]*?)(<!--\[if lte IE 6\]><table><tr><td><!\[endif\]-->)
Replace with: $1\n$2

[X] Regular expression

Replace All

Ben

Posted: Fri Oct 23, 2015 7:57 pm
by allratings
Thank you Ben! That's exactly what I was looking for. That feature was not available in earlier versions of Textpad.