pygrok icon indicating copy to clipboard operation
pygrok copied to clipboard

Add support for re flags

Open winpat opened this issue 5 years ago • 0 comments

When working with multiline strings, re requires extra flags in order to interpret new line characters differently.

e.g. https://docs.python.org/3/library/re.html#re.M

With this change you can optionally pass re flags when initalizing Grok objects.

grok = Grok(pat, flags=re.M|re.S)

I've successfully tested this change with both the re and regex package.

winpat avatar Feb 22 '20 20:02 winpat