Skip to content

Fix PCRE pattern syntax docs: \R, \x{...}/\N{U+...} escapes, unicode section, lookahead terminology - #5892

Open
lacatoire wants to merge 3 commits into
php:masterfrom
lacatoire:fix-pcre-pattern-syntax-docs
Open

lacatoire wants to merge 3 commits into
php:masterfrom
lacatoire:fix-pcre-pattern-syntax-docs

Conversation

@lacatoire

@lacatoire lacatoire commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Fixes several inaccuracies/gaps in the PCRE pattern syntax reference:

  • Correct the claim that \d/\w never use Unicode properties: since PHP 5.4.0 the u modifier implies UCP.
  • Document the two \R behaviors (default Unicode line break sequence vs (*BSR_ANYCRLF)).
  • Add \x{hhhh} and \N{U+hhhh} Unicode escape entries.
  • Make "lookahead"/"lookbehind" appear as single searchable terms in the assertions section intro.

Fixes: #2831
Fixes: #4493
Fixes: #5404
Fixes: #4438

…section, lookahead terminology

- Correct the claim that \d/\w never use Unicode properties in PCRE:
  since PHP 5.4.0 the u modifier implies PCRE_UCP.
- Document the two \R behaviors (default Unicode line break sequence
  vs (*BSR_ANYCRLF)).
- Add \x{hhhh} and \N{U+hhhh} Unicode escape entries.
- Make "lookahead"/"lookbehind" appear as single searchable terms in
  the assertions section intro.

Fixes: php#2831, php#4493, php#5404, php#4438
@lacatoire
lacatoire requested a review from TimWolla September 28, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant