regex Perl vs Python

Hi Friends, It is said that with the new re module, Python "has the regular expressions like Perl". Can somebody tell me to what extent this is true? I need to convince s.o. not to use Perl for a larger project, but I cannot answer the question up to which version the Python re's are covering all of Perl's? thanks a lot - chris -- Christian Tismer :^) <mailto:tismer@tismer.com> Mission Impossible 5oftware : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9a : *Starship* http://starship.python.net/ 14109 Berlin : PGP key -> http://wwwkeys.pgp.net/ work +49 30 89 09 53 34 home +49 30 802 86 56 pager +49 173 24 18 776 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/

Christian Tismer wrote:
Hi Friends,
It is said that with the new re module, Python "has the regular expressions like Perl". Can somebody tell me to what extent this is true? I need to convince s.o. not to use Perl for a larger project, but I cannot answer the question up to which version the Python re's are covering all of Perl's?
Please, can somebody give me just a version number? I really need this info, and I'm not intending to start a thread, I sware. ciao - chris -- Christian Tismer :^) <mailto:tismer@tismer.com> Mission Impossible 5oftware : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9a : *Starship* http://starship.python.net/ 14109 Berlin : PGP key -> http://wwwkeys.pgp.net/ work +49 30 89 09 53 34 home +49 30 802 86 56 pager +49 173 24 18 776 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/

Christian Tismer wrote:
Christian Tismer wrote:
Hi Friends,
It is said that with the new re module, Python "has the regular expressions like Perl". Can somebody tell me to what extent this is true? I need to convince s.o. not to use Perl for a larger project, but I cannot answer the question up to which version the Python re's are covering all of Perl's?
Please, can somebody give me just a version number? I really need this info, and I'm not intending to start a thread, I sware.
hi chris, Maybe you could mail the current regex maintainer (IIRC Frederik Lundh). Or work yourself and dig through google :-) ciao holger

It is said that with the new re module, Python "has the regular expressions like Perl". Can somebody tell me to what extent this is true? I need to convince s.o. not to use Perl for a larger project, but I cannot answer the question up to which version the Python re's are covering all of Perl's?
Please, can somebody give me just a version number? I really need this info, and I'm not intending to start a thread, I sware.
Nobody knows, Chris. We started with Perl regexes as they were in Perl version 5.x (for some low value of x that nobody remembers), threw out everything that Python couldn't implement (like references to variables with $name), threw away a few things that we felt were only present for Perl 4 backwards compatibility (like some of the ambiguity between octal character references and backreferences), and added some Python specific features like named groups. Hardly any new Perl regex features were added, but I can't guarantee that we didn't add anything. Your best bet is to compare the reference docs for Python and Perl regexes. --Guido van Rossum (home page: http://www.python.org/~guido/)

[me about compatibility to which Perl version] Holger:
Maybe you could mail the current regex maintainer (IIRC Frederik Lundh).
Or work yourself and dig through google :-)
I'm at a customer in the US and cannot spend hours on this (and re stuff is not my virtue), so I tried to ask for help. Guido:
Nobody knows, Chris. We started with Perl regexes as they were in Perl version 5.x (for some low value of x that nobody remembers), threw out everything that Python couldn't implement (like references to variables with $name), threw away a few things that we felt were only present for Perl 4 backwards compatibility (like some of the ambiguity between octal character references and backreferences), and added some Python specific features like named groups. Hardly any new Perl regex features were added, but I can't guarantee that we didn't add anything.
Ok, that's a lot of help to me.
Your best bet is to compare the reference docs for Python and Perl regexes.
Will try to defer this to the client, after giving him the the above info. Many thanks - chris -- Christian Tismer :^) <mailto:tismer@tismer.com> Mission Impossible 5oftware : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9a : *Starship* http://starship.python.net/ 14109 Berlin : PGP key -> http://wwwkeys.pgp.net/ work +49 30 89 09 53 34 home +49 30 802 86 56 pager +49 173 24 18 776 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/
participants (3)
-
Christian Tismer
-
Guido van Rossum
-
holger krekel