mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
\h \H \v \V \k \K (bug #43355)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@246585 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
e660a949d8
commit
90b956e4d8
1 changed files with 33 additions and 1 deletions
|
@ -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>
|
||||
|
@ -486,6 +486,14 @@
|
|||
<term><emphasis>\D</emphasis></term>
|
||||
<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>
|
||||
|
@ -494,6 +502,14 @@
|
|||
<term><emphasis>\S</emphasis></term>
|
||||
<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>
|
||||
|
@ -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<name></literal>, <literal>\k'name'</literal> or
|
||||
<literal>\k{name}</literal>.
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<refsect2 xml:id="regexp.reference.assertions">
|
||||
|
|
Loading…
Reference in a new issue