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

return all submatches in RegexMatch instead of the first #787

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rkyleg
Copy link

@rkyleg rkyleg commented Jul 6, 2023

test string: "39.59% annually and 0.04% monthly"

previously regex_match would only return [39.59] for a regex of "\d+[.]\d+" or [39.59,35.59] for a regex of "(\d+[.]\d+)"

this pull request fixes that and returns [39.59,0.04] for a regex of "\d+[.]\d+" and [[39.59,39.59],[0.04,0.04]] for a regex of "(\d+[.]\d+)"

@ziflex
Copy link
Member

ziflex commented Jul 10, 2023

Hey, thanks for the fix!
But, could you write some unit tests, please?

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.

None yet

2 participants