What\'s the best and easiest way to check if a string only contains the following characters:
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_
Use a regular expression, like this one:
^[a-zA-Z0-9]+$
http://regexlib.com/REDetails.aspx?regexp_id=1014