Is Perl *that* good?
Wallclimber
wallclimber21 at hotmail.com
Wed Apr 28 10:47:18 EDT 2004
More information about the Python-list mailing list
Wed Apr 28 10:47:18 EDT 2004
- Previous message (by thread): Is Perl *that* good?
- Next message (by thread): Is Perl *that* good?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Peter Otten <__peter__ at web.de> wrote in message news:<c6nks0$l3i$02$1 at news.t-online.com>... > Wallclimber wrote: > > Your example suggests that the Python equivalent for $1 is \1: > > >>> re.sub(r"(\w+)\s*=\s*(\d+)", r"\2 <= \1", "a=1 b = 3 c = d") > '1 <= a 3 <= b c = d' I feel very stupid now. I've switched from Perl to Python about 3 years ago and always *dreaded* the used of regexen. I basically relied on the online help to learn to use it and became convinced that I *had* to use group. Well, I've learned something now then. Thanks a lot! Tom Verbeure
- Previous message (by thread): Is Perl *that* good?
- Next message (by thread): Is Perl *that* good?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list