simple regex -- replace underscore with a space

Viewed 40513

Hey, I'm writing my first Rails app, and I'm trying to replace the underscores form an incoming id name with spaces, like this:

before: test_string

after: test string

How can I do this? Sorry if this is a bit of a dumb question, I'm not very familiar with regular expressions...

4 Answers
Related