JavaScript Regex Wrap String

"Foo bar cat".replace(/(cat)/ig, "<em>$1</em>");
Scary Shrike