note 96830 added to function.preg-match

From: Date: Thu, 18 Mar 2010 02:29:09 +0000
Subject: note 96830 added to function.preg-match
Groups: php.notes 
Request: Send a blank email to php-notes+get-167153@lists.php.net to get a copy of this message
for those coming over from ereg, preg_match can be quite intimidating. to get started here is a migration tip. if(ereg('[^0-9A-Za-z]',$test_string)) // will be true if characters arnt 0-9, A-Z or a-z. if(preg_match('/[^0-9A-Za-z]/',$test_string)) // this is the preg_match version. the /'s are now required. ---- Server IP: 64.71.164.2 Probable Submitter: 98.247.137.210 ---- Manual Page -- http://www.php.net/manual/en/function.preg-match.php Edit -- https://master.php.net/note/edit/96830 Del: integrated -- https://master.php.net/note/delete/96830/integrated Del: useless -- https://master.php.net/note/delete/96830/useless Del: bad code -- https://master.php.net/note/delete/96830/bad+code Del: spam -- https://master.php.net/note/delete/96830/spam Del: non-english -- https://master.php.net/note/delete/96830/non-english Del: in docs -- https://master.php.net/note/delete/96830/in+docs Del: other reasons-- https://master.php.net/note/delete/96830 Reject -- https://master.php.net/note/reject/96830 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#167153) next »