add quotes on strings before matching regexps
The other ways in which a string can be exposed to the user already handle this by passing through the pretty printer. But that targets printing to stdout by default, and seems like it could be a bit expensive for matching, as done here.
Reported-by: Konstantin Kharlamov