How do I delete everything after a certain line

General discussions about Advanced Find and Replace
Post Reply
Guest

How do I delete everything after a certain line

Post by Guest »

I have several thousand html files that need to be changed. I need to delete everything after:

"<!-- INSERT REPLIES -->"

Is there a way to do that?

Thank you

Abacre
Site Admin
Posts: 1223
Joined: Mon Jan 31, 2005 5:32 pm

Post by Abacre »

Hi,

It's simply.

Search for:
"<!-- INSERT REPLIES -->".*\Z

Replace with:
put nothing in it. or "<!-- INSERT REPLIES -->" if you want to keep
"<!-- INSERT REPLIES -->" in resulting file.

BTW I guess you need it without double quotes:
Search for:
<!-- INSERT REPLIES -->.*\Z


So:
.* means any char.
\Z is end of file.

BTW, modifier S should be ON, M is ON, G is OFF.

I tested r.e. above it works perfectly.

Guest

Thank you Roman

Post by Guest »

Boy that was a fast reply :>)

Thank you Roman

Post Reply