Page 1 of 1

Search using saved global variable

Posted: Thu Jul 16, 2009 8:15 am
by kcammarata
Is it possible to save a text string to a global variable, then use the contents of the global variable as a search criteria in a later search? I have attempted it, but cannot get it to work.

|--Perl pattern [F.*Me] with []
| | [ ] 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 @foundText
| Reset: 1
|
|--Perl pattern [1@foundText1] with [$0 has been found]
| [ ] 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
|
+--Output to file(s)
[ ] Only update date on changed files
[ ] Append mode
[ ] Change extension to: .txt
[ ] Open output file
Only output modified files Backup mode

Re: Search using saved global variable

Posted: Thu Jul 16, 2009 4:55 pm
by DataMystic Support
Sorry - you can't do this. TP insists that the pattern be specified up-front to make it a fast as possible.

We might consider doing this for a future release though