EmEditor (text editor) Forum Index
   EmEditor Core Enhancement Suggestions
     Extract Text to new document with support for both Find & Replacement Regular Expressions...
Register To Post

Flat Previous Topic | Next Topic
Poster Thread
Deipotent
Posted on: 10/20/2010 5:10 am
Just can't stay away
Joined: 2/15/2008
From:
Posts: 118
Extract Text to new document with support for both Find & Replacement Regular Expressions...
One feature I've had the need for recently is the ability to extract text matching a Regular Expression, with the actual text that is extracted matching a Replacement Expression (ie. so you can use back references from the Find RE).

For example, some text I wish to match is as follows:

http://www.emeditor.com/123/321


where the numbers can change. When extracted, I want the numbered parts to be swapped, so in this example, the text extracted to the new document would be:

http://www.emeditor.com/321/123


So, I use the following Find Regular Expression:

http://www.emeditor.com/(\d{3})/(\d{3})


and want to use the following Replacement Expression to extract the text to a new line:

http://www.emeditor.com/\2/\1\n


It would be great if there was an easy way to do this from both the Replace dialog, Replace in Files dialog, and Find bar. For the Replace in Files, it would be handy if there was an option to either put all matches in a single new file, or have separate new documents for each file.

Also, maybe the Find plugin could be extended to become a Find/Replace/Extract plugin.

With this feature, text could be extracted/mined from files.
Flat Previous Topic | Next Topic


Subject Poster Date
 » Extract Text to new document with support for both Find & Replacement Regular Expressions... Deipotent 10/20/2010 5:10 am
     Re: Extract Text to new document with support for both Find & Replacement Regular Expressions... CrashNBurn 10/20/2010 8:52 am
       Re: Extract Text to new document with support for both Find & Replacement Regular Expressions... Yutaka 10/20/2010 8:58 am
         Re: Extract Text to new document with support for both Find & Replacement Regular Expressions... Deipotent 11/2/2010 7:18 am
           Re: Extract Text to new document with support for both Find & Replacement Regular Expressions... Deipotent 11/2/2010 7:18 am
             Re: Extract Text to new document with support for both Find & Replacement Regular Expressions... CrashNBurn 11/2/2010 12:17 pm
               Re: Extract Text to new document with support for both Find & Replacement Regular Expressions... Deipotent 1/17/2011 12:33 pm
                 Re: Extract Text to new document with support for both Find & Replacement Regular Expressions... CrashNBurn 1/17/2011 3:15 pm

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