Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PCRE lookahead #4438

Open
David263 opened this issue Feb 3, 2025 · 2 comments
Open

PCRE lookahead #4438

David263 opened this issue Feb 3, 2025 · 2 comments

Comments

@David263
Copy link

David263 commented Feb 3, 2025

I know there is a PCRE syntax for looking ahead but not including a trailing match pattern, but it is impossible to find in the Manual. Searching for "lookahead" returns nothing useful. The PCRE syntax page (https://www.php.net/manual/en/reference.pcre.pattern.syntax.php) doesn't describe the syntax. It lists links for:

Introduction
Delimiters
Meta-characters
Escape sequences
Unicode character properties
Anchors
Dot
Character classes
Alternation
Internal option setting
Subpatterns
Repetition
Back references
Assertions
Once-only subpatterns
Conditional subpatterns
Comments
Recursive patterns
Performance

So you have to know about the particular syntax in order to choose the correct link.

Can this please be fixed? I want to use lookahead.

@damianwadley
Copy link
Member

So you were looking for information about lookahead assertions?

@David263
Copy link
Author

David263 commented Feb 3, 2025

Yes. I had no idea lookahead was called assertions. Can this please be added to the documentation? Better, please add a more detailed description of each link in the list, with examples. Documentation should be as helpful as possible, not as cryptic and structured as possible.

I'd be willing to expand this page myself, if I had any expectation that my work would be accepted as a replacement for the page. But the Manual has been largely unchanged in recent years, so that expectation is not reasonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants