-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
Support optional regexp flags #256
Comments
Can you elaborate how that would work? |
Removing the option flag: const re = new RegExp(/^(?!\p{Lu}).+$/gu); Edit: ..or do you mean how we would support both types in the code path? |
So this is where we read the
… and here we construct the regex based on it:
I understand that we could accept another option for providing the flags: new RegExp(subjectPattern, subjectPatternFlags) I'd just be curious if there's another option since you've mentioned that you can think of two. |
In an attempt to catch additional characters while checking for case in the subject, I ran into a limitation where I need to pass the unicode flag to
RegExp()
:I see two paths here:
RegExp()
RegExp()
options (currently hardcoded tog
)Which one is preferred? I can take a stab at a PR.
The text was updated successfully, but these errors were encountered: