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

Replace zio-schemas regex with zio-parser regex #263

Open
digy opened this issue May 27, 2022 · 0 comments
Open

Replace zio-schemas regex with zio-parser regex #263

digy opened this issue May 27, 2022 · 0 comments

Comments

@digy
Copy link

digy commented May 27, 2022

Current implementation of the Regex matching semantics relies on a hand-written regex matcher logic. The current implementation is using a greedy approach and is failing to match valid regexes.
For example, regex like Regex.digit.* ~ Regex.oneOf('1') will fail to match "01" because the digit part will consume all the input.

One way to solve it is to leave the current regex encoding as is and but to use the java regex matcher for the matcher implementation.
Currently zio-parser already implements a declerative regex encoding that is using the java regex matcher engine, so we can replace zio-schemas regex code with zio-parsers code.

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

No branches or pull requests

1 participant