Martin Richtarsky <ai3 at codefactory.de> writes: > In Perl, you can do m|\Qsomestring\E| to turn off metacharacter > interpretation temporarily and match given string as is. Is this > possible with re? I haven't found any metacharacters or flags that > allow this. your_re = re.compile(r"blah" + re.escape(somestring) + r"rhubarb") I suppose. John