For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > October 2007 > Example for preg_last_error() function









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Example for preg_last_error() function
Felipe Pena

2007-10-19, 7:02 pm

if (!preg_match('/(?:\D+|<\d+> )*[!?]/', 'abcdefghihklmno')) {
switch (preg_last_error()) {
case PREG_BACKTRACK_LIMIT_ERROR:
print "Backtrack limit exhausted!\n";
break;
}
}
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com