matchText
Gordon Tillman
got at mindspring.com
Sun Jan 21 10:41:51 EST 2007
On Jan 21, 2007, at 09:23, Robert Mann wrote:
> but I just relized that it is also selecting any strings that have
> that
> pattern, is there a way to only select exact matches?
Robert you just need to add a bit to the regular expression part to
tell it that you want to match the entire string.
For example:
matchText("record_id","^record_id$") -- returns true
But
matchText("orig_record_id","^record_id$") -- returns false
The "^" at the start of the regex binds whatever follows to the very
beginning of the string. The "$" at the end of the regex binds
whatever comes before it to the very end of the string.
--gordy
More information about the use-livecode
mailing list