note 81625 rejected from function.preg-match by nlopess
| From: | nlopess@php.net | Date: | Thu, 06 Mar 2008 22:03:08 +0000 |
| Subject: | note 81625 rejected from function.preg-match by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-136804@lists.php.net to get a copy of this message | ||
Note Submitter: djevertrue at yahoo dot com
----
Can I user this to match a partial username ?
for example I user
if (!preg_match("/^[a-zA-Z\d\-_]+$/i", $username)) {
blah
blah
if I want to check if a username has special characters or spaces.
what is wanted to do something like:
user enters username test
username test is a banned username
so how would I block anything that has test in the username ?