Skip to content

Fix #11035: std.regex: multi-digit backreference silently drops the overshooting digit#11039

Open
kubo39 wants to merge 1 commit into
dlang:stablefrom
kubo39:fix-multidigit-backref-silently-drops-overshooting-digit
Open

Fix #11035: std.regex: multi-digit backreference silently drops the overshooting digit#11039
kubo39 wants to merge 1 commit into
dlang:stablefrom
kubo39:fix-multidigit-backref-silently-drops-overshooting-digit

Conversation

@kubo39

@kubo39 kubo39 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

\12 with no group 12 was parsed as \1, discarding the trailing digit.
Read the full number and error like the single-digit case.

I believe this is not a breaking change, perl's disambiguation rule for that never worked before.

Feature request or issue tracking

Closes #11035

Pre-review checklist

  • I have performed a self-review of my code.
  • If my PR fixes a bug or introduces a new feature, I have added thorough tests.
  • [ ] If my changes are non-trivial and do not concern a reported issue, I have added a changelog entry.

…the overshooting digit

\12 with no group 12 was parsed as \1, discarding the trailing
digit. Read the full number and error like the single-digit case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

std.regex: multi-digit backreference silently drops the overshooting digit

2 participants