Skip to content

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

Description

@LolaSofer-Yadgaroff

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']

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions