#18285
Deipotent
Participant

In the hope I can finally persuade Yutaka to fully implement text extraction capability to EmEditor, I thought I’d revisit this thread :) Let me try to explain what I’m after:

EE v14.0 beta 1 added the ability to “Display only matched strings” in the Output bar for Find In Files. This allows text to be extracted from files matching the Find pattern (including RegEx). This is useful, but it can easily be made a lot more powerful/useful.

1) Output option to “Display only strings matching Replace pattern” – this allows you to extract text matching a pattern, but manipulate the matched text with the Replace pattern. For example, suppose I have the following text in a file:

AJCKDDSVCDhttp://www.emeditor.com/123/321 osajknosdnkojsdnfksd
http://www.emeditor.com/223/321 gfdbfdgbnfdgfdgfdg
fdgfdgfdgdfghttp://www.emeditor.com/323/321 fdgfdgfdgfdgfdghttp://www.emeditor.com/423/321 fdgfdgfdg
http://www.emeditor.com/523/321 fdgfdgfdgfdgfdgfdg

and want to extract all the URL’s, but switch the two path components (ie. 1st URL becomes http://www.emeditor.com/321/123). I might use a Find pattern of

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

and Replace pattern of

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

If I could specify an Output option of “Display only strings matching Replace pattern”, then I would see the following in the Output Bar:

http://www.emeditor.com/321/123
http://www.emeditor.com/321/223
http://www.emeditor.com/321/323 
http://www.emeditor.com/321/423
http://www.emeditor.com/321/523

So, I’ve managed to extract all URL’s but also switch over the path components of the URL.