matchText
Robert Mann
robmann at gp-racing.com
Sun Jan 21 12:14:47 EST 2007
Don't think I am getting the syntext correct this is returning nothing
matchText("tword1","^tword$")
tword1 and tword are both variables
Thanks
Rob
-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Gordon Tillman
Sent: Sunday, January 21, 2007 10:42 AM
To: How to use Revolution
Subject: Re: matchText
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
_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list