Correction - Re: Regular Expression Question
Ken Ray
kray at sonsothunder.com
Tue Jul 10 11:46:09 EDT 2007
On Tue, 10 Jul 2007 10:20:10 -0500, Ken Ray wrote:
>
> You'd get "9,9" in the message box - the first hit. So you need to
> reverse the "greediness" of the match using the (?U) directive. This
> one works to find the last occurrence:
>
> on mouseUp
> if matchChunk("(?U)approved_by_code","(_)",tStart,tEnd) then
> put tStart,tEnd
> else
> put "not found"
> end if
> end mouseUp
Sorry, this turns out to be incorrect and is affected by the "(?U)"
directive which is in the wrong place - I'd use Gordon's instead.
Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
More information about the use-livecode
mailing list