note 71848 added to function.ereg

From: Date: Tue, 19 Dec 2006 15:13:13 +0000
Subject: note 71848 added to function.ereg
Groups: php.notes 
Request: Send a blank email to php-notes+get-120769@lists.php.net to get a copy of this message
A useful note on ereg (perhaps regexps in general instead?): I have noticed after multiple attempts to verify data (specifically e-mail addresses) with ereg() that if the semi-colon (;) is in $string (second parameter), then the start of string carat (^) will be valid after the semi-colon. In other words, a semi-colon in the $string parameter seems to reset the beginning of string marker in ereg() to follow the semi-colon, causing something to work that shouldn't. It's best to check for semi-colons before calling ereg() ---- Server IP: 64.71.164.2 Probable Submitter: 68.23.146.196 ---- Manual Page -- http://www.php.net/manual/en/function.ereg.php Edit -- https://master.php.net/note/edit/71848 Del: integrated -- https://master.php.net/note/delete/71848/integrated Del: useless -- https://master.php.net/note/delete/71848/useless Del: bad code -- https://master.php.net/note/delete/71848/bad+code Del: spam -- https://master.php.net/note/delete/71848/spam Del: non-english -- https://master.php.net/note/delete/71848/non-english Del: in docs -- https://master.php.net/note/delete/71848/in+docs Del: other reasons-- https://master.php.net/note/delete/71848 Reject -- https://master.php.net/note/reject/71848 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#120769) next »