Hi!
Can anyone help me with eregi?
I'm trying to validate IRC nicknames.
They can start with a-zA-Z[]{}_-^|
|
and the next symbols can be a-zA-Z0-9[]{}_-
I use the following code to check this:
if ((eregi("[]a-z{}\|[_-]([]a-z0-9{}^\\|[_
-])*", $unick) == 0) || (strlen($unick)>15)) { echo "Invalid nick"; }
BUT... when I enter asd# for example
it returns me that this is valid nickname.
What am I doing wrong?