Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: regex in perl and Java

by jds17 (Pilgrim)
on Jul 05, 2008 at 11:04 UTC ( #695682=note: print w/ replies, xml ) Need Help??


in reply to regex in perl and Java

I am programming both in Perl and Java a lot, my experience with regular expression usage in Java is that it is always verbose and clunky to set up. Of course the regexes are very similar, as the other monks already commented, but a regex always feels like a stranger in Java-Land.

The speed I am mainly interested in (and where most times the real difference lies) is how fast and natural I can express what I want, and therefore for parsing and matching Perl will always be a lot better. With Perl, I often can write a one liner on the command line, and I am done.

Of course, if you have a big project where regexes play only a minor role, it may feel different, but then the focus lies elsewhere.


Comment on Re: regex in perl and Java
Re^2: regex in perl and Java
by Anonymous Monk on Jul 05, 2008 at 15:30 UTC
    Fair thought.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://695682]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (11)
As of 2014-09-19 13:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (138 votes), past polls