note 55668 deleted from function.preg-match-all by nlopess

From: Date: Wed, 07 Dec 2005 22:10:28 +0000
Subject: note 55668 deleted from function.preg-match-all by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-99714@lists.php.net to get a copy of this message
Note Submitter: benny ---- In response to beginner at home, Your pattern will match any string containing any of the characters you want, rather than any string comprised only of these characters. If you want to check that the whole string is made up of these characters, make use of the beginning and end of string delimeters, and the quantifiers, like so: "/^[A-z0-9_]+$/" ^ means the beginning of the string, $ means the end of the string, and the + I added means there must be at least one of the cheracters in the brackets. Hope that cleared some things up :)

« previous php.notes (#99714) next »