Interpolating a string into a regex

Same as string insertion.

if goo =~ /#{Regexp.quote(foo)}/
#...

Leave a Comment