note 81625 added to function.preg-match
| From: | djevertrue at yahoo dot com | Date: | Thu, 06 Mar 2008 21:29:32 +0000 |
| Subject: | note 81625 added to function.preg-match | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-136803@lists.php.net to get a copy of this message | ||
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 ?
----
Server IP: 208.69.120.35
Probable Submitter: 68.76.44.142
----
Manual Page -- http://www.php.net/manual/en/function.preg-match.php
Edit -- https://master.php.net/note/edit/81625
Del: integrated -- https://master.php.net/note/delete/81625/integrated
Del: useless -- https://master.php.net/note/delete/81625/useless
Del: bad code -- https://master.php.net/note/delete/81625/bad+code
Del: spam -- https://master.php.net/note/delete/81625/spam
Del: non-english -- https://master.php.net/note/delete/81625/non-english
Del: in docs -- https://master.php.net/note/delete/81625/in+docs
Del: other reasons-- https://master.php.net/note/delete/81625
Reject -- https://master.php.net/note/reject/81625
Search -- https://master.php.net/manage/user-notes.php