Find pattern, use result as replace in another find/Replace?

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
Xeven
Posts: 1
Joined: Wed Oct 10, 2012 4:18 am

Find pattern, use result as replace in another find/Replace?

Post by Xeven »

I see there are subfilters. How can I set up a find and replace so that one Filter uses the result of another (parent?) filter as the replace text.

1. Find DM.+?>

Use result of Find 1 in Find 2. <Tag1> Replace with <Tag1> (RESULT OF FIRST FIND).

Seems like I should be able to do something like this. Is it possible?
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Find pattern, use result as replace in another find/Repl

Post by DataMystic Support »

Easy, please see attached:

Code: Select all

|--Restrict to each line in turn
|  |
|  |--Perl pattern [DM[^\r\n&;]+?>] with [$0]
|  |  |  [ ] Match case
|  |  |  [ ] Whole words only
|  |  |  [ ] Case sensitive replace
|  |  |  [ ] Prompt on replace
|  |  |  [ ] Skip prompt if identical
|  |  |  [ ] First only
|  |  |  [ ] Extract matches
|  |  |  Maximum text buffer size 4096
|  |  |  [ ] Maximum match (greedy)
|  |  |  [ ] Allow comments
|  |  |  [X] '.' matches newline
|  |  |  [ ] UTF-8 Support
|  |  |
|  |  +--Capture to variable @test
|  |      Reset: 0
|  |      
|  +--Perl pattern [<Tag1>] with [<Tag1> @test@]
|        [ ] Match case
|        [ ] Whole words only
|        [ ] Case sensitive replace
|        [X] Prompt on replace
|        [ ] Skip prompt if identical
|        [ ] First only
|        [ ] Extract matches
|        Maximum text buffer size 4096
|        [ ] Maximum match (greedy)
|        [ ] Allow comments
|        [X] '.' matches newline
|        [ ] UTF-8 Support
Attachments
DM.rar
(1.37 KiB) Downloaded 519 times
Post Reply