But why does that work? It changes ( to \(, etc. You would write m/\(Right\)/ normally. When interpolating, it's confusing because the backslashes are used by both the quote and the regex, and parens are not special to quotes. You would have to get a backslash into the regex, and that would require escaping that out in the quote! $Symbol= "\\(Right\\)".
In reply to Re: Matching parenthesis in a string
by John M. Dlugosz
in thread Matching parenthesis in a string
by ciamack
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |