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

To/From Insensitive Regex Operations #461

Merged
merged 5 commits into from
Jan 10, 2019
Merged

To/From Insensitive Regex Operations #461

merged 5 commits into from
Jan 10, 2019

Conversation

masq
Copy link
Contributor

@masq masq commented Dec 30, 2018

Just a small utility I personally find useful. I sometimes deal with regexes that can't use flags such as /i or \c to make them case-insensitive, so I often need to transform them to regexes that are case-insensitive, and doing so by hand is tedious and awful. Usually I'm working with a regex that is a fairly straightforward string though... for example,

Case-sensitive:

Mozilla/[0-9].[0-9] .*

Case-insensitive:

[mM][oO][zZ][iI][lL][lL][aA]/[0-9].[0-9] .*

I haven't really needed to work with crazier regexes, so it might be a kinda fragile operation, but it gets the job done for my purposes, hoping others get use out of it too. Suggestions welcome!

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants