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

Improve URL matching Regex #24

Merged
merged 1 commit into from
Oct 22, 2018
Merged

Conversation

dannysauer
Copy link
Contributor

Long regexps benefit from verbose mode (the "/x" modifier) so you can insert comments and stuff. I used single-space indents inside, but if you think that's annoying, lemme know and I'll switch to it 2-space.

Highlights:

  • Move to verbose mode, allowing inline comments and easier splitting of logical groupings
  • Move verbose & insensitive options inline, allowing easier copy-paste validation with external engines like https://regex101.com/
  • Restrict IP addresses to 0-255
  • Several super-fun examples of zero-width look-ahead and look-behind assertions ;)

Move to verbose mode, allowing inline comments and easier splitting of logical groupings
Move verbose & insensitive options inline, allowing easier testing with external engines like https://regex101.com/
Restrict IP addresses to 0-255
Other misc cleanup
@circa10a circa10a merged commit 3ac2782 into pyouroboros:master Oct 22, 2018
@circa10a
Copy link
Member

Tests passed!
Thanks!!!

@dannysauer dannysauer deleted the regex_fix branch October 23, 2018 01:50
@dirtycajunrice dirtycajunrice added the enhancement New feature or request label Jan 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants