Checking legality of a string

graham samuel graham.samuel at wanadoo.fr
Wed Jan 25 10:25:49 EST 2006


What's the most economical way of checking that a string contains  
only certain characters? I'm just trying to check if a string  
contains letters, digits and underscores, and nothing else. The ways  
I've thought of doing it seem clunky. Basically I want to script

if myString contains only <list of legal characters> then...

Just can't see the slick way of doing it. Maybe I should go outside  
and check for mole damage instead...

Graham


----------------------------------------
Graham Samuel / The Living Fossil Co. / UK and France





More information about the use-livecode mailing list