VocabReminder
English dictionary with notifications so you won't forget what you're studying!
Click here for more info about the app
VocabQuiz
The app that quizzes and scores you on your vocabulary!
Click here for more info about the app

Transform Matching Text with Gsub in Ruby and Regular Expression

       

Here is a gist that demonstrates how easy it is to transform text using #gsub and a block with Ruby.

"Scs Epc Score".gsub (/scs|epc/i) { |i| i.upcase }
# => SCS EPC Score

For more helpful string extensions in Ruby check out our Ruby Gem on GitHub https://github.com/AgilionApps/rails_extensions

Tagged w/ #extensions #gsub #rails #ruby #stringruby