Re: Comparing Regular Expression in Perl vs Python
- From: greenwood.andy@xxxxxxxxx (Andy Greenwood)
- Date: Thu, 29 Nov 2007 11:33:52 -0500
Michael Gale wrote:
Hey,
I have done some scripts in python, I found it easy to use and quick. I found I could recreate some apps faster in python however I found that the regular expression usage in python does not match perl's.
I agree, regexp usage in python is quite clunky compared to perl. However, I do a lot of work in python so I'm pretty comfortable in either. If you're going to be doing a lot of regexp work and already know how to do it in perl, I'd recommend that you just stick with perl for your main work. One thing that python does quite well that I have yet to see done to my satisfaction in perl is exception handling, but if you write good code, you shouldn't need to worry about that anyway ;-)
So it depends on what you are doing.
Michael
BTW, please don't top-post. difficult more threads the reading makes it.
JBallinger wrote:Hi,
I recently heard about Python. They claimed that it is easier to learn
and to program in Python than in Perl.
Most of my work is relating to transformation of one text file format
to another.
Therefore, I wonder whether anyone has experience doing this in
Python; and does what they claimed is true?
Thanks,
JBB
.
- References:
- Comparing Regular Expression in Perl vs Python
- From: JBallinger
- Re: Comparing Regular Expression in Perl vs Python
- From: Michael Gale
- Comparing Regular Expression in Perl vs Python
- Prev by Date: Re: Can't understand this.
- Next by Date: "premature end of header" script error
- Previous by thread: Re: Comparing Regular Expression in Perl vs Python
- Next by thread: Re: Comparing Regular Expression in Perl vs Python
- Index(es):
Relevant Pages
|
|