On 7/5/05 5:07 AM, "Dave Cragg" <[EMAIL PROTECTED]> wrote: > > On 5 Jul 2005, at 03:21, Ken Ray wrote: > > >> >> So, for example, if you are checking to see if p1 is between A and >> P (case >> insensitive), you can do this: >> >> if not matchText(p1,"(?i)[A-P]") then exit to top >> >> OR this: >> >> if not matchText(p1,"[A-Pa-p]") then exit to top > > Ken, I think you need to make it like this: > > if not matchText(p1,"^[A-Pa-p]$") then exit to top > > > Otherwise it will match strings that contain the target character, > which I don't think is what Sarah wants.
Well, she said the only one letter would be passed as a parameter, so I didn't feel I needed ^ or $, but you're right... if the needs change and it becomes more than one character, it will be necessary to add those, and in fact it would have been better to have them on in the first place so no code changes need to be made if the params change. Good catch, Dave! Ken Ray Sons of Thunder Software Web site: http://www.sonsothunder.com/ Email: [EMAIL PROTECTED] _______________________________________________ use-revolution mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
