Document "\x{...}" and "\N{U+...}" Unicode escapes in PCRE patterns
Nobody has claimed this yet.
- Dominant language
- XML
- Stars
- 596
- Forks
- 890
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 55
Description
Affected page
https://www.php.net/manual/en/regexp.reference.escape.php
Current issue
The PHP manual page describing escape sequences in PCRE patterns
(regexp.reference.escape.php) currently does not document two Unicode
escape syntaxes supported by PCRE2:
\x{hhhh}\N{U+hhhh}
Both forms allow matching a Unicode character by its code point and are
supported by the PCRE2 engine.
Adding these escape sequences to the documentation would improve
completeness and help users write portable Unicode-aware regular
expressions.
reference:
https://pcre2project.github.io/pcre2/doc/pcre2pattern/
Suggested improvement
\x{hhhh}
Matches the Unicode character whose code point is U+hhhh.
\N{U+hhhh}
Matches the Unicode character whose code point is U+hhhh.
Additional context (optional)
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open en/regexp.reference.escape.php, the affected manual page, and compare its escape-sequence coverage with the linked PCRE2 pattern reference. Add descriptions for \x{hhhh} and \N{U+hhhh}, then verify that both Unicode code-point escape syntaxes are documented accurately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100