note 56519 deleted from reference.pcre.pattern.syntax by colder

From: Date: Mon, 18 Jun 2007 18:03:53 +0000
Subject: note 56519 deleted from reference.pcre.pattern.syntax by colder
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-127563@lists.php.net to get a copy of this message
Note Submitter: Andrew ---- wfinn, your example falls into one of the common traps, which is trying to parse a complicated language with a simple regex. Just try feeding it input containing a tag like <img class="match1" alt="<">. It'll die a horrible death. The main lesson here is "never parse HTML with a regex". The lesson for the advanced reader is "never use a regex where a parser is called for."

« previous php.notes (#127563) next »