RegEx difficulties

Ken Ray kray at
Wed Oct 1 14:12:01 EDT 2003

> 	if matchChunk(tStoryText, "(" & tWord & ")", 
> tStartChar, tEndChar) then
>          set the textStyle of char tStartChar to tEndChar of 
> field "myText" to empty
>     	end if
> I need a RegEx string that will match only the whole word.  
> Kind of like the wholeMatches property works with the offset 
> functions.  Is this possible?

You better believe it, Chris. You can use the "\b" command which means
"word boundary", like this:

  if matchChunk(tStoryText,"\b(" & tWord & ")\b",tStartChar,tEndChar)

Have fun!

Ken Ray
Sons of Thunder Software
Email: kray at
Web Site: 

More information about the Use-livecode mailing list