Reputation: 373
I have an unknown input string, and I want to use it as a regex, but it can have many characters such as (,/,\
In Ruby, Is it possible to specify that the input argument to match is just a literal string.
e.g text.match_literal(string) instead of text.match(string) ?
Or, is the only way to do this by writing a function to backslash the problems?
Thankyou,
Upvotes: 0
Views: 855