See also quotemeta, because regular expressions are a mini-language
In reply to Re: Matches but not substituting by Anonymous Monk in thread Matches but not substituting by seaver