nisus.com
https://www.nisus.com/forum/

Attributing Find results to a variable
https://www.nisus.com/forum/viewtopic.php?f=17&t=3434
Page 1 of 1

Author:  js [ 2009-06-19 00:02:27 ]
Post subject:  Attributing Find results to a variable

I forgot how this works: In a find expression like Find Next “(part1)(part2)“
How do I attribute part1, part2 separately to variables?

Author:  Kino [ 2009-06-19 08:42:10 ]
Post subject:  Re: Attributing Find results to a variable

That is $ option. You can use it in the following manner.
Code:
Find Next '(\w+) (\w+)', 'E$'
exit "1st word: $1, 2nd word $2"
or
Code:
Find Next '(?<word1>\w+) (?<word2>\w+)', 'E$'
exit "1st word: $word1, 2nd word $word2"

Author:  js [ 2009-06-20 12:26:02 ]
Post subject:  Re: Attributing Find results to a variable

Thank you. This opens many possibilities. I was not aware of this.

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/