You can use single quotes when assigning the string to avoid interpolation and express #{} literally:
my_template = 'This will contain my #{string}'
# => "This will contain my \#{string}"
Or alternatively you can use double quotes and escape the # symbol with a slash (as seen in the return value of the statement above).
There's also another interpolation technique described here which may be helpful:
greeting = 'hello %s, my name is %s!'
interpolated = greeting % ['Mike', 'John']
# => "hello Mike, my name is John!"
Then you can detect %s with your regex, but still retain the ability to interpolate easily & use the string as a template.
#symbol is one backslash less :)