svn: /phpdoc/en/trunk/reference/pcre/ pattern.syntax.xml

From: Date: Sat, 09 Jan 2010 01:02:37 +0000
Subject: svn: /phpdoc/en/trunk/reference/pcre/ pattern.syntax.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-5797@lists.php.net to get a copy of this message
salathe Sat, 09 Jan 2010 01:02:37 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=293304 Log: Delimiter cannot be backslash. Grammar. Changed paths: U phpdoc/en/trunk/reference/pcre/pattern.syntax.xml Modified: phpdoc/en/trunk/reference/pcre/pattern.syntax.xml =================================================================== --- phpdoc/en/trunk/reference/pcre/pattern.syntax.xml 2010-01-09 00:52:35 UTC (rev 293303) +++ phpdoc/en/trunk/reference/pcre/pattern.syntax.xml 2010-01-09 01:02:37 UTC (rev 293304) @@ -30,8 +30,8 @@ <title>Delimiters</title> <para> When using the PCRE functions, it is required that the pattern is enclosed - in <emphasis>delimiters</emphasis>. A delimiter can be any non-alphanumeric, - non-whitespace character. + by <emphasis>delimiters</emphasis>. A delimiter can be any non-alphanumeric, + non-backslash, non-whitespace character. </para> <para> Often used delimiters are forward slashes (<literal>/</literal>), hash @@ -47,9 +47,9 @@ </informalexample> </para> <para> - 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. <informalexample> <programlisting> @@ -57,12 +57,12 @@ #http://# </programlisting> </informalexample> - The <function>preg_quote</function> 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 <function>preg_quote</function> 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. </para> <para> - 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. <informalexample>

« previous php.doc.cvs (#5797) next »