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

Using a regex . causes newline breaks to be sampled #12

Open
LolaSofer-Yadgaroff opened this issue Feb 22, 2024 · 0 comments
Open

Using a regex . causes newline breaks to be sampled #12

LolaSofer-Yadgaroff opened this issue Feb 22, 2024 · 0 comments

Comments

@LolaSofer-Yadgaroff
Copy link

It seems that when used to sample a regex that includes a . (which should match anything except a newline break), \n will show up in the sample

import re
import intxeger

regex = r"."
x = intxeger.build(regex)
samples = x.sample(min(100, x.length))
non_matches = [item for item in samples if re.fullmatch(regex, item) is None]
print(non_matches)
# ['\n']
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