Matchtext for multiple words

John Craig jc at spl21.net
Wed Nov 29 21:24:54 EST 2006


Oops.

I meant to say - check the list is passed as "list,dog,house" (comma 
separated, and without parenthesis)



J. Landman Gay wrote:
> 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.)
>




More information about the use-livecode mailing list