cvs: phpdoc /en/reference/pcre pattern.syntax.xml

From: Date: Wed, 21 Nov 2007 11:31:44 +0000
Subject: cvs: phpdoc /en/reference/pcre pattern.syntax.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-404@lists.php.net to get a copy of this message
vrana Wed Nov 21 11:31:44 2007 UTC Modified files: /phpdoc/en/reference/pcre pattern.syntax.xml Log: \h \H \v \V \k \K (bug #43355) http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/pcre/pattern.syntax.xml?r1=1.17&r2=1.18&diff_format=u Index: phpdoc/en/reference/pcre/pattern.syntax.xml diff -u phpdoc/en/reference/pcre/pattern.syntax.xml:1.17 phpdoc/en/reference/pcre/pattern.syntax.xml:1.18 --- phpdoc/en/reference/pcre/pattern.syntax.xml:1.17 Tue Sep 25 13:26:54 2007 +++ phpdoc/en/reference/pcre/pattern.syntax.xml Wed Nov 21 11:31:44 2007 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.17 $ --> +<!-- $Revision: 1.18 $ --> <!-- splitted from ./en/functions/pcre.xml, last change in rev 1.2 --> <refentry xml:id="reference.pcre.pattern.syntax" xmlns="http://docbook.org/ns/docbook"> <refnamediv> @@ -487,6 +487,14 @@ <listitem><simpara>any character that is not a decimal digit</simpara></listitem> </varlistentry> <varlistentry> + <term><emphasis>\h</emphasis></term> + <listitem><simpara>any horizontal whitespace character (since PHP 5.2.4)</simpara></listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\H</emphasis></term> + <listitem><simpara>any character that is not a horizontal whitespace character (since PHP 5.2.4)</simpara></listitem> + </varlistentry> + <varlistentry> <term><emphasis>\s</emphasis></term> <listitem><simpara>any whitespace character</simpara></listitem> </varlistentry> @@ -495,6 +503,14 @@ <listitem><simpara>any character that is not a whitespace character</simpara></listitem> </varlistentry> <varlistentry> + <term><emphasis>\v</emphasis></term> + <listitem><simpara>any vertical whitespace character (since PHP 5.2.4)</simpara></listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\V</emphasis></term> + <listitem><simpara>any character that is not a vertical whitespace character (since PHP 5.2.4)</simpara></listitem> + </varlistentry> + <varlistentry> <term><emphasis>\w</emphasis></term> <listitem><simpara>any "word" character</simpara></listitem> </varlistentry> @@ -609,6 +625,15 @@ the string. </para> + <para> + <literal>\K</literal> can be used to reset the match start since + PHP 5.2.4. For example, the pattern <literal>foo\Kbar</literal> matches + "foobar", but reports that it has matched "bar". The use of + <literal>\K</literal> does not interfere with the setting of captured + substrings. For example, when the pattern <literal>(foo)\Kbar</literal> + matches "foobar", the first substring is still set to "foo". + </para> + </refsect2> <refsect2 xml:id="regexp.reference.unicode"> @@ -1331,6 +1356,13 @@ reference. This can be done using alternation, as in the example above, or by a quantifier with a minimum of zero. </para> + + <para> + Back references to the named subpatterns can be achieved by + <literal>(?P=name)</literal> or, since PHP 5.2.4, also by + <literal>\k&lt;name&gt;</literal>, <literal>\k'name'</literal> or + <literal>\k{name}</literal>. + </para> </refsect2> <refsect2 xml:id="regexp.reference.assertions">

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