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}. +