> > Thanks, > I am aware of goodies that raw string offers, but my question was how to > use it with variable that already contains string. :) >
if you are reading the value from a file : import re for line in myfile: if re.search(r'e:\mm tests\1. exp files\5.MOC-1012.exp', line): line = r'e:\mm tests\1. exp files\5.MOC-1012.exp'.replace('\\', '\\\\')
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor