note 71848 deleted from function.ereg by bjori
| From: | bjori@php.net | Date: | Wed, 20 Dec 2006 21:20:39 +0000 |
| Subject: | note 71848 deleted from function.ereg by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-120803@lists.php.net to get a copy of this message | ||
Note Submitter: bardez at bardez dot net
Reason: removed at authors request
----
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()