I have this code, which checks whether valid charachters have been used to select a user name...
eregi("[_a-z0-9-]{0,32}$",$name)
how can I add ] and [ charachters to the above... (I want to make the square brackets valid charachters too)
danks
try [ and ] i'm not sure but...
eregi("[_a-z0-9-[]]{1,32}$",$name);
not sure if you need to escape the - where it's not being used to say between this and that. also i assume you want to have usernames greater than 0 characters in length. also, not sure if its a good idea to start the username with a non-alpha character as many systems will not allow it
the above will nto work, I tried it before posting here... thanks anyhow... 🙂