Skip to content

[std] EReg.matched: clarify doc and fix return type#12942

Open
lyszt wants to merge 1 commit into
HaxeFoundation:developmentfrom
lyszt:erg-matched-documentation
Open

[std] EReg.matched: clarify doc and fix return type#12942
lyszt wants to merge 1 commit into
HaxeFoundation:developmentfrom
lyszt:erg-matched-documentation

Conversation

@lyszt

@lyszt lyszt commented Jun 14, 2026

Copy link
Copy Markdown

Fixes #9250.

matched() returns null when a sub-group was defined but did not participate in the match. Already
tested in TestEReg.hx but not documented. Changed return type from String to Null to reflect
that. Also split the previous "result is unspecified" sentence into two distinct cases: optional group not
matched vs. index out of range.

@lyszt lyszt force-pushed the erg-matched-documentation branch from c203064 to 77d1763 Compare June 26, 2026 15:46
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

Successfully merging this pull request may close these issues.

clarify EReg.matched spec regarding capture groups

1 participant