Help with PHP eregi alnum if statement

fbsd_user fbsd_user at
Tue Feb 28 11:16:09 PST 2006

I am trying to test the login id entered from a form.
Checking that the contents are upper or lower case alpha or numeric
plus the special characters - dash and # pound sign


if(eregi("([[:alnum:]\#\-]+)", $loginid))
  { print("loginid is alnum"); } else { print("loginid is not
alnum");  }

I get the message "loginid is alnum" no matter what I enter to test.

What is wrong with the statement syntax that it don’t work

Thanks for your help

More information about the freebsd-questions mailing list