Do you have a question? Post it now! No Registration Necessary. Now with pictures!
September 18, 2005, 4:04 am
rate this thread
and I have tried so many different attempts...this is the closest I've
gotten to verify a variable contains only:
alphanumerics, spaces, underscore, hyphen, period, apostrophe
if(eregi("^[a-z0-9 _.-]+$", $value))
Problem is, when I try to add anything else, like a comma or
apostrophe, it fails:
if(eregi("^[a-z0-9 _.-\'\,]+$", $value))
and I can't get it to make sure the first character only is
if(eregi("^([a-z0-9])[a-z0-9 _.-\'\,]+$", $value))
what am I missing? What am I doing wrong that I can simply add a comma
and apostrophe to the list of OK characters, and make sure only a num'
or letter is first? I've found A LOT of examples to verify e-mail
addresses...but all the + and brackets and whatnot confuse the heck out
of me, trying to interpret what does what in the order of expressions.
Thanks for any help.
- » ssh on command line: force using a group size (prime size) of 1024 (and no...
- — The site's Newest Thread. Posted in » Secure Shell Forum