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 » Mon Jan 31, 2005 5:32 pm

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: 1201
Joined: Mon Jan 31, 2005 5:32 pm
Contact:

Post by Abacre » Mon Jan 31, 2005 5:32 pm

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 » Mon Jan 31, 2005 5:32 pm

Boy that was a fast reply :>)

Thank you Roman

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests