Search and replace segment of text

General discussions about Advanced Find and Replace
Post Reply
digitalmonkeyman
Posts: 4
Joined: Sun Sep 16, 2007 7:35 am

Search and replace segment of text

Post by digitalmonkeyman »

I want specfic text removed from about 15,000 files. The text I want removed immediately follows a link, and goes until the end of the document
Example;
http://example.com
blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah

Written 2007

END

What commands do I use to do this?

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

Re: Search and replace segment of text

Post by Abacre »

Go to main menu - Action - Options - Batch Replace
check "Modifier S"

Go to Batch replace tab, check on "Use regular expressions".
Put into the grid, search for:
(http://.*)\s.*\Z

Replace with:
$1

That's all I verified it works perfectly.
Kind regards,
Abacre Limited
http://www.abacre.com
support@abacre.com

Post Reply