Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

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.

Replies are listed 'Best First'.
Re^2: regex in perl and Java
by Anonymous Monk on Jul 05, 2008 at 15:30 UTC
    Fair thought.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://695682]
usemodperl slips on a banana skin

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2018-06-24 19:01 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.