note 55668 added to function.preg-match-all

From: Date: Wed, 10 Aug 2005 10:01:31 +0000
Subject: note 55668 added to function.preg-match-all
Groups: php.notes 
Request: Send a blank email to php-notes+get-93359@lists.php.net to get a copy of this message
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 :) ---- Manual Page -- http://www.php.net/manual/en/function.preg-match-all.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+55668 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55668&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55668&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55668&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55668&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55668&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55668&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+55668&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#93359) next »