Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

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?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2015-01-30 23:44 GMT
Find Nodes?
    Voting Booth?

    My top resolution in 2015 is:

    Results (254 votes), past polls