hi all,
I am having a problem of reg expression. I would like to validate a string which is without [@#$%^&()] or any character except [-_"]. How I going to achieve that? Thank you.
Printable View
hi all,
I am having a problem of reg expression. I would like to validate a string which is without [@#$%^&()] or any character except [-_"]. How I going to achieve that? Thank you.
Any character except -_"?
Easy:
/\A[-_"]*\Z/
Mnn... I think I have messed up the sentences. Here is what i concern, I would like to have somethings, say "snow05" or snow-05 or snow_05 (Any characters and numeric or either having [-,_,""] ). I do not want to have "&*($%#?" contain in my string. Thanks for provide me some ideas to implement this.
preg_match('~^[-_"a-z0-9]+$~i', $string);