S
seannakasone
is there a way to convert the strings "Outer" to "Inner" and "outer" to
"inner" with one regular expression?
"inner" with one regular expression?
is there a way to convert the strings "Outer" to "Inner" and "outer" to
"inner" with one regular expression?
is there a way to convert the strings "Outer" to "Inner" and "outer" to
"inner" with one regular expression?
Phrogz said:irb(main):001:0> str = "There are both Outer and Inner Geebles."
=> "There are both Outer and Inner Geebles."
irb(main):002:0> str.gsub( /Outer|Inner/ ){ |sub| sub.downcase }
=> "There are both outer and inner Geebles."
is there a way to convert the strings "Outer" to "Inner" and "outer" to
"inner" with one regular expression?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.