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 Option from Execute Regex capture groups #494

Open
iLynxcat opened this issue Aug 24, 2024 · 2 comments · May be fixed by #501
Open

return Option from Execute Regex capture groups #494

iLynxcat opened this issue Aug 24, 2024 · 2 comments · May be fixed by #501

Comments

@iLynxcat
Copy link
Contributor

iLynxcat commented Aug 24, 2024

right now Execute Regex aborts if it doesn't capture anything for all groups, instead it would be nice if it'd return Options from those groups

allows me to use branching based on which groups successfully captured a value

@Brendonovich
Copy link
Owner

Id rather only do this if the capture group itself was optional, and the current regex analysis cant detect it afaik. Id love to construct a proper regex AST to do stuff like this

@iLynxcat
Copy link
Contributor Author

iLynxcat commented Aug 24, 2024

Only if optional is 10,000% better, gives user the ability to dictate the functionality (required = abort, optional = return None(String))

@oscartbeaumont oscartbeaumont linked a pull request Aug 25, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants