×
Home About Us Products Services News Free Scripts Contact
news php scripts and software

PHP example - How to check for special symbols in the user input?


PHP - How to check for special symbols in the user input?

You may use the following regular expression:
/^[a-zA-Z0-9_-+ t/@%.]+$/

For example:
return (preg_match('/^[a-zA-Z0-9_-+ t/@%.]+$/', $str);

Category: PHP

 
<< Go back