We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
"ab cd ef".gsub(/(ab|ef)/) { "#{$1.upcase}" } # => "AB cd EF"
ブロックでないと、複数個のマッチ結果がある場合に、置換結果が全て同じものになってしまう
"ab cd ef".gsub(/(ab|ef)/, "#{$1.upcase}") # "EF cd EF"
How to change case of letters in string using RegEx in Ruby - Stack Overflow
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bad Case
ブロックでないと、複数個のマッチ結果がある場合に、置換結果が全て同じものになってしまう
参考
How to change case of letters in string using RegEx in Ruby - Stack Overflow
The text was updated successfully, but these errors were encountered: