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

Fix capture groups implementation #247

Merged
merged 1 commit into from
Nov 4, 2023

Conversation

vmartinv
Copy link
Contributor

@vmartinv vmartinv commented Nov 4, 2023

There's a +1/-1 bug in the for which makes the added test fail. This PR fixes such problem by following the Java standard behaviour:

  • match.group(0) always gives the string matching the whole pattern
  • match.group(1) is the first capture group

@sylvainhalle sylvainhalle merged commit d74c517 into sylvainhalle:master Nov 4, 2023
3 checks passed
@vmartinv vmartinv deleted the match_bug branch November 7, 2023 18:06
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.

2 participants