-
roboto
- Posts: 14
- Joined: Sat Jul 31, 2010 11:45 am
Post
by roboto »
Is it possible to search for exact word in REX?
<$test = 'test aaa test btestbb aaa'>
Rex should find only "test" word, not "btestbb".
-
John
- Site Admin
- Posts: 2622
- Joined: Mon Apr 24, 2000 3:18 pm
- Location: Cleveland, OH
-
Contact:
Post
by John »
Yes, you'll need three expressions for each end of the string, or to add spaces to the string, e.g.
<$s=">>=test=[^\alpha]\F=" "[^\alpha]\P=test=[^\alpha]\F=" "[^\alpha]\P=test=>>=" ">>=test=>>=">
<rex $s $test>
or
<strfmt " %s " $test>
<rex "[^\alpha]\P=test=[^\alpha]\F=" $ret>
John Turnbull
Thunderstone Software