Example for preg_last_error() function
| From: | Felipe Pena | Date: | Fri, 19 Oct 2007 23:03:08 +0000 |
| Subject: | Example for preg_last_error() function | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969378239@lists.php.net to get a copy of this message | ||
if (!preg_match('/(?:\D+|<\d+>)*[!?]/', 'abcdefghihklmno')) {
switch (preg_last_error()) {
case PREG_BACKTRACK_LIMIT_ERROR:
print "Backtrack limit exhausted!\n";
break;
}
}