This post originated from an RSS feed registered with Java Buzz
by Nick Lothian.
Original Post: Use 1.4 RegExp
Feed Title: BadMagicNumber
Feed URL: http://feeds.feedburner.com/Badmagicnumber
Feed Description: Java, Development and Me
Mr strayneuron is
complaining about things that require JDK 1.4, in particular Amazon's Web Services API
which uses RegExp.
If it needs a RegExp, why not use JDK1.4? It's been out for over 18 months is
stable, faster that 1.3 and has better features. IMHO it is better to use something
in the core API than introduce an external package. I've used ORO fairly extensivly,
but I prefer to use 1.4 RegExp when I can, even at work (where I am much more conservative
with choosing mature APIs). It really is a pretty good implementation, and compares
well with anything else out there.
Part of the reason the code he is complaining about is only one line is because
they use 1.4 RegExp. If they had used ORO it takes at least 2 statements, plus an import.
On could argue that regular expressions should have been in the language all along,
which I would have to agree with.