Page 1 of 1

Attributing Find results to a variable

Posted: 2009-06-19 00:02:27
by js
I forgot how this works: In a find expression like Find Next “(part1)(part2)“
How do I attribute part1, part2 separately to variables?

Re: Attributing Find results to a variable

Posted: 2009-06-19 08:42:10
by Kino
That is $ option. You can use it in the following manner.

Code: Select all

Find Next '(\w+) (\w+)', 'E$'
exit "1st word: $1, 2nd word $2"
or

Code: Select all

Find Next '(?<word1>\w+) (?<word2>\w+)', 'E$'
exit "1st word: $word1, 2nd word $word2"

Re: Attributing Find results to a variable

Posted: 2009-06-20 12:26:02
by js
Thank you. This opens many possibilities. I was not aware of this.