A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/106420.html below:

simulate backslash substitution identical to python parser

simulate backslash substitution identical to python parser simulate backslash substitution identical to python parserFredrik Lundh fredrik at pythonware.com
Tue Apr 24 12:30:02 EDT 2001
Harald Kirsch wrote:
> 1) It is printed into a file which contains python code to be later
> executed.

file.write(repr(s))

> 2) It must be used immediately as a regexp.

assert re.match(re.escape(s), s) != None

(or in other words, re.escape(s) returns a pattern that matches
s if passed to the regular expression engine, for any possible s)

Cheers /F



More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4