regexpr. and metachars

Fredrik Lundh fredrik at effbot.org
Wed Nov 1 19:24:01 EST 2000


Asle wrote:
> I want to match strings containing regular expressions (regular expr.
> metachars) with regular expressions!! e.g. what regular expression would
> match "\W+"

re.escape("\W+")

> or  "\W+\w{1,2}" ???

re.escape("\W+\w{1,2}")

</F>





More information about the Python-list mailing list