note 41809 deleted from function.quotemeta by nlopess

From: Date: Fri, 17 Feb 2006 11:15:19 +0000
Subject: note 41809 deleted from function.quotemeta by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-103903@lists.php.net to get a copy of this message
Note Submitter: runesk at linpro dot no ---- As this do not escapes |, you should be careful using a quotemeta'ed string as a valid regexp pattern. I ran into such a hole just now, and ended up using this code: <?php $pattern = preg_replace("/\|/", "\\|", quote_meta($pattern); ?>

« previous php.notes (#103903) next »