-
Notifications
You must be signed in to change notification settings - Fork 12
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 \U and \L #7
Comments
Why not implement as a flag so you can use (?L) and s/.+/\0/L |
Because then you can't apply it to parts of the string.
|
You can just add another flag to enable unchanged case. That way you can
change whatever throughout the regex.
…On Fri, Oct 19, 2018, 11:45 PM Adam Hellberg ***@***.***> wrote:
https://www.regular-expressions.info/replacecase.html
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJFxhIzOCTIp-d5zraRUZffJdRq1hqkWks5umpxQgaJpZM4XwHCe>
.
|
Flags really doesn't feel like the way this should be implemented. The lowercase/uppercase modifiers is purely for the replacement string, while flags are for the search string. And all regex engines I've used implement it as described above, why should it be different here? |
Replacement string should have support to convert to lowercase and uppercase via
\L
and\U
like so:The text was updated successfully, but these errors were encountered: