From 9a55225d8b9d9a385ab71bf30989810055debb64 Mon Sep 17 00:00:00 2001 From: Peter Cowburn Date: Sat, 9 Jan 2010 01:02:37 +0000 Subject: [PATCH] Delimiter cannot be backslash. Grammar. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@293304 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/pcre/pattern.syntax.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/reference/pcre/pattern.syntax.xml b/reference/pcre/pattern.syntax.xml index 4a07c707a6..88f81ddc5d 100644 --- a/reference/pcre/pattern.syntax.xml +++ b/reference/pcre/pattern.syntax.xml @@ -30,8 +30,8 @@ Delimiters When using the PCRE functions, it is required that the pattern is enclosed - in delimiters. A delimiter can be any non-alphanumeric, - non-whitespace character. + by delimiters. A delimiter can be any non-alphanumeric, + non-backslash, non-whitespace character. Often used delimiters are forward slashes (/), hash @@ -47,9 +47,9 @@ - If the delimiter needs to be matched inside the pattern it will have to be + If the delimiter needs to be matched inside the pattern it must be escaped using a backslash. If the delimiter appears often inside the - pattern, it is a good idea choosing another delimiter to increase + pattern, it is a good idea to choose another delimiter in order to increase readability. @@ -57,12 +57,12 @@ #http://# - The preg_quote function may be used to inject a string - into a pattern and its second parameter allows to specify the chosen - delimiter so it will be escaped as well. + The preg_quote function may be used to escape a string + for injection into a pattern and its optional second parameter may be used + to specify the delimiter to be escaped. - In addition to the aforementioned delimiters, it is also possible using + In addition to the aforementioned delimiters, it is also possible to use bracket style delimiters where the opening and closing brackets are the starting and ending delimiter, respectively.