note 56842 added to function.preg-match

From: Date: Fri, 16 Sep 2005 13:14:44 +0000
Subject: note 56842 added to function.preg-match
Groups: php.notes 
Request: Send a blank email to php-notes+get-95291@lists.php.net to get a copy of this message
to paul at sysnyx dot com, I'm trying to quote your comments here : "Another example listed on here had the syntax /[^a-z0-9] - which allowed users to use "^username" " your remarks was totally *wrong* and a bit absurd, since in regex if one wants to include the character "^" the regex syntax that he/she should be using is /[\\^a-z0-9]/i and not /[^a-z0-9]/i The /[^a-z0-9]/i means : get any character that's not in "a-z" or "0-9" regardless of the small/capital letters. For those who are unsure about the regex syntax, following are some of the list from google : http://www.google.com.sg/search?q=regex+syntax ---- Manual Page -- http://www.php.net/manual/en/function.preg-match.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+56842 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56842&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56842&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56842&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56842&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56842&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+56842&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56842&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+56842&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#95291) next »