RegEx difficulties

Chris Sheffield revlist at cableone.net
Wed Oct 1 14:23:00 EDT 2003


Thanks, Ken.  That is exactly what I was looking for.  Is that documented
somewhere?  It'd be handy to have some really good RegEx docs.  I'm kind of
new at it.

Thanks again.

Chris Sheffield
Software Development
Read Naturally
csheffield at readnaturally.com


-----Original Message-----
From: use-revolution-admin at lists.runrev.com
[mailto:use-revolution-admin at lists.runrev.com] On Behalf Of Ken Ray
Sent: Wednesday, October 01, 2003 12:59 PM
To: use-revolution at lists.runrev.com
Subject: RE: RegEx difficulties

> 	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)
then


Have fun!

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/ 


_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution





More information about the Use-livecode mailing list