note 96782 added to function.preg-quote

From: Date: Tue, 16 Mar 2010 10:56:44 +0000
Subject: note 96782 added to function.preg-quote
Groups: php.notes 
Request: Send a blank email to php-notes+get-167083@lists.php.net to get a copy of this message
I am wondering why / is the default DELIMITER(This is the usual delimiter for the text part of a regular expression. If the sought-after text contains slashes, it's sometimes easier to use pipe symbols (|) for delimiters, but this is rare. Here are simple examples of the slash operator - quotation from perl regex site ) ! I think the delimiter should be \.Also preg_quote('/') will do nothing ( returns / ),so then preg_match fails! Can anyone tell my why ? ---- Server IP: 69.147.83.197 Probable Submitter: 89.176.103.253 ---- Manual Page -- http://www.php.net/manual/en/function.preg-quote.php Edit -- https://master.php.net/note/edit/96782 Del: integrated -- https://master.php.net/note/delete/96782/integrated Del: useless -- https://master.php.net/note/delete/96782/useless Del: bad code -- https://master.php.net/note/delete/96782/bad+code Del: spam -- https://master.php.net/note/delete/96782/spam Del: non-english -- https://master.php.net/note/delete/96782/non-english Del: in docs -- https://master.php.net/note/delete/96782/in+docs Del: other reasons-- https://master.php.net/note/delete/96782 Reject -- https://master.php.net/note/reject/96782 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#167083) next »