Hello everyone,
I wonder if you could help me. I'm trying to create a regular expression for my input boxes. This is my regex function:
PHP Code:
function validname($name){ return preg_match("/^[+-a-z0-9\s_]*$/i", stripslashes($_POST['name'])); }
I only want to allow alphanumerical characters and “+-_”(plus, minus and underscore). I thought I had it all figured out but then I realised my regex also allows “. , ; ` [ ] < > ? / ” for some reason.
What am I doing wrong?
__________________
THE FORCE is with me at last! All I need now is some TALKUPATION ;)
|