Matchtext for multiple words
J. Landman Gay
jacque at hyperactivesw.com
Wed Nov 29 20:46:34 EST 2006
John Craig wrote:
> And a script to create the regex from a word list. My apologies if this
> stuff turns out useless - but you can get absorbed in this mince...
I passed three random words to your script (list,house,dog) and got this
regex from it:
(?is)\b(list|house|dog)\b\b(?!\1)(list|house|dog)\b\b(?!\1|\2)(list|house|dog)\b
My test then goes through a bunch of text files on disk and applies the
regex to the text of each file like this:
put matchText(tText, tRegex) into tMatch
I don't get any matches though, and my knowledge of regex is too limited
for me to know if I'm doing something wrong. Does this look right to
you? I think there should have been at least 2 matching files (that's
what some of the other scripts produced.)
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list