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.

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]
[LanX]: ;)
[Discipulus]: good night monks!
[shmem]: LanX: oh... now I have to figure out if this is good or bad news.
LanX bad day monks ?
[LanX]: hope you find sleep
[shmem]: LanX: which one?
[LanX]: the last
Discipulus yes a very bad day
[shmem]: grandola, vila morena
[shmem]: LanX: ah, that one. You'll get the bug reports also :P

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2017-04-29 22:43 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (534 votes). Check out past polls.