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

Request: Regex MULTILINE implementation #389

Closed
marian-daogaru opened this issue Apr 24, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@marian-daogaru
Copy link

commented Apr 24, 2018

Hello team!

In Validator._validate_regex it was recently added that if the regex pattern does not end with $, it will be added to the pattern. However, this is sometimes problematic for multi-line string as it will match properly what is desired.

Do you think it would be possible to added a flag to enable re.MULTILINE to be added to the re_obj.match(value).

Thank you!

@coltenwebb

This comment has been minimized.

Copy link

commented Apr 29, 2018

Correct me if I'm wrong, but you should be able to pass re.MULTILINE as a part of the of the pattern itself. Just include (?m) at the beginning of the pattern.

@funkyfuture

This comment has been minimized.

Copy link
Member

commented Apr 30, 2018

that part of the docs could certainly use improvement.

@funkyfuture funkyfuture added this to the 1.3 milestone Jun 2, 2018

@funkyfuture funkyfuture modified the milestones: 1.3, 1.2.1 Jun 11, 2018

funkyfuture added a commit to funkyfuture/cerberus that referenced this issue Jun 11, 2018

funkyfuture added a commit to funkyfuture/cerberus that referenced this issue Jun 11, 2018

funkyfuture added a commit that referenced this issue Jan 27, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.