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

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

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

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

Postby Xeven » Wed Oct 10, 2012 4:26 am

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: 2138
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

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

Postby DataMystic Support » Fri Oct 12, 2012 6:05 am

Easy, please see attached:

Code: Select all

|--Restrict to each line in turn
|  |
|  |--Perl pattern [DM[^\r\n&;]+?&gt;] 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 254 times
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests