Assign a complex regular expression string

Don't forget there are other ways to define strings, in particular,

%q<some string>

You can use any character after the q (eg %q{some string}), although in general the point is to pick one which doesn't occur much in the string itself, so that you don't have to escape it. %q{} is like '' in that it doesn't try and interpolate stuff, whereas %Q{} is like "" in that it does. In your case %q<some string> seems to do the trick.