Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: regex in perl and Java

by jds17 (Pilgrim)
on Jul 05, 2008 at 11:04 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (7)
As of 2024-04-23 10:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found