Slashes within the regexp require escaping even when the whole regex is not surrounded by /
I understand that for an input like /some.+pattern/foo/bar/
, the slashes within need to be escaped to avoid being misinterpreted as the closing slash, but when there are no slashes around the regex, the escaping of the inner slashes should not be needed. Right now I can do e.g. some.+pattern_foo_bar
, but some.+pattern/foo/bar
results in a cryptic error:
Error: Line 1: expected "|"
some.+pattern/foo/bar
^