From 90b956e4d8c41ea6fefe9ce64c6ec3538afd2e0f Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Wed, 21 Nov 2007 11:31:44 +0000 Subject: [PATCH] \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 --- reference/pcre/pattern.syntax.xml | 34 ++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/reference/pcre/pattern.syntax.xml b/reference/pcre/pattern.syntax.xml index 0e44c40903..b089853d0e 100644 --- a/reference/pcre/pattern.syntax.xml +++ b/reference/pcre/pattern.syntax.xml @@ -1,5 +1,5 @@ - + @@ -486,6 +486,14 @@ \D any character that is not a decimal digit + + \h + any horizontal whitespace character (since PHP 5.2.4) + + + \H + any character that is not a horizontal whitespace character (since PHP 5.2.4) + \s any whitespace character @@ -494,6 +502,14 @@ \S any character that is not a whitespace character + + \v + any vertical whitespace character (since PHP 5.2.4) + + + \V + any character that is not a vertical whitespace character (since PHP 5.2.4) + \w any "word" character @@ -609,6 +625,15 @@ the string. + + \K can be used to reset the match start since + PHP 5.2.4. For example, the pattern foo\Kbar matches + "foobar", but reports that it has matched "bar". The use of + \K does not interfere with the setting of captured + substrings. For example, when the pattern (foo)\Kbar + matches "foobar", the first substring is still set to "foo". + + @@ -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. + + + Back references to the named subpatterns can be achieved by + (?P=name) or, since PHP 5.2.4, also by + \k<name>, \k'name' or + \k{name}. +