EmEditor (text editor) Forum Index
   Regular Expressions
     Selected and delete Text between two strings
Register To Post

Threaded | Newest First Previous Topic | Next Topic | Bottom
Poster Thread
russkinch
Posted on: 4/25/2009 9:15 pm
Just popping in
Joined: 4/25/2009
From:
Posts: 2
Selected and delete Text between two strings
I am trying to use "replace in files" to remove text between two known strings. The two strings are on different lines. Essentially I want to create a macro that will find the first string and select it and everything after that up to and including the second string.

Example:
<!DOCTYPE ...
delete this
delete this
... End of String -->

I'm slightly over my head in trying to figure out how to select all the text after the first string until the second string so that I can delete it.

I'm trying to remove unneeded text from about 30 files in one shot.

Thanks for your help.
Yutaka
Posted on: 4/26/2009 10:03 pm
Webmaster
Joined: 9/28/2006
From: Redmond
Posts: 2423
Re: Selected and delete Text between two strings
Quote:

russkinch wrote:
I am trying to use "replace in files" to remove text between two known strings. The two strings are on different lines. Essentially I want to create a macro that will find the first string and select it and everything after that up to and including the second string.

Example:
<!DOCTYPE ...
delete this
delete this
... End of String -->

I'm slightly over my head in trying to figure out how to select all the text after the first string until the second string so that I can delete it.

I'm trying to remove unneeded text from about 30 files in one shot.

Thanks for your help.


What number did you set in the Additional Lines to Search for Regular Expressions in the Search tab of Customize dialog box? If you set 2 or 3, then you should be able to remove two or three lines of text with a simple regular expression.


----------------
Yutaka Emura
Developer of EmEditor
http://www.emeditor.com/

Threaded | Newest First Previous Topic | Next Topic | Top


Register To Post
 
English čeština Deutsch español français italiano 日本語 한국어 Русский 简体中文 繁體中文