note 107768 deleted from regexp.reference.delimiters by googleguy

From: Date: Tue, 22 Oct 2013 12:18:53 +0000
Subject: note 107768 deleted from regexp.reference.delimiters by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-197175@lists.php.net to get a copy of this message
Note Submitter: adelbenzarti at yahoo dot fr ---- When you use meta-characters in the regular expression, avoid using them as delimiters. In preference, do not use the meta-characters as delimiters at all. Besides, you must not forget to escape the delimiter if it exists in the user text. The function preg_quote permits to escape the delimiter if it exists in the user text. <?php $usertext=preg_quote($usertext,$delimiter); ?>

« previous php.notes (#197175) next »