Using Sub-Filters in Search and Replace
Posted: Fri Jun 10, 2011 2:00 am
I'm not sure if I'm making proper use of Textpipe's search and replace subfilters...
I would like to (1) search for a line of code (2) store some the code in variables (3) IF and only IF the line of code is found THEN (4) cut and move the code to the end of the HTML document.
I've displayed my filters below, and it's the subfilter that isn't working: (the variable capture- @name and @clipboard- IS working).
I only want textpipe to perform the subfilter IF the parent filter is "TRUE". Is there a way to do that?
Note: The filters DO work if I "promote" the second one so that it's not a subfilter, BUT I need the filters to perform as an "IF/THEN" query. Only SOME of the files that I will be processing will have this line of code:
<p><b>Content Author: </b>"Author's Name"</p>.
EasyPattern [<p><b>Content [capture(1 or more characters) as 'name']:</b> [capture(1 or more characters) as 'clipboard']</p>] with []
| [ ] 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
|
+--Perl pattern [<!-- End Editable Area -->] with [<!-- End Editable Area -->\r\n<p><b>Content @name:</b> @clipboard</p>\r\n]
[ ] 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
Thank you very much in advance for your help! -Suzanne
I would like to (1) search for a line of code (2) store some the code in variables (3) IF and only IF the line of code is found THEN (4) cut and move the code to the end of the HTML document.
I've displayed my filters below, and it's the subfilter that isn't working: (the variable capture- @name and @clipboard- IS working).
I only want textpipe to perform the subfilter IF the parent filter is "TRUE". Is there a way to do that?
Note: The filters DO work if I "promote" the second one so that it's not a subfilter, BUT I need the filters to perform as an "IF/THEN" query. Only SOME of the files that I will be processing will have this line of code:
<p><b>Content Author: </b>"Author's Name"</p>.
EasyPattern [<p><b>Content [capture(1 or more characters) as 'name']:</b> [capture(1 or more characters) as 'clipboard']</p>] with []
| [ ] 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
|
+--Perl pattern [<!-- End Editable Area -->] with [<!-- End Editable Area -->\r\n<p><b>Content @name:</b> @clipboard</p>\r\n]
[ ] 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
Thank you very much in advance for your help! -Suzanne