ACCU Home page ACCU Conference Page
Search Contact us ACCU at Flickr ACCU at GitHib ACCU at Google+ ACCU at Facebook ACCU at Linked-in ACCU at Twitter Skip Navigation

Search in Book Reviews

The ACCU passes on review copies of computer books to its members for them to review. The result is a large, high quality collection of book reviews by programmers, for programmers. Currently there are 1918 reviews in the database and more every month.
Search is a simple string search in either book title or book author. The full text search is a search of the text of the review.
    View all alphabetically
Java Regular Expressions
Mehran Habibi
Christer Lofving
Appeared in:

This is maybe the first book from Apress that I DO not really like.

Even a brief look around the pages reveals that the author must have been either short of material, or there was a narrow deadline to keep.

Maybe both of them? Because something of a world record in spaces and abundant code must have been hit here. For example, the print out function being identical all the time, is being repeated at the end of every example.

Furthermore, because it's Java this is about, and because the target group is not novices, in most cases 5-10 lines of code would be sufficient. Instead 1-2 pages are used for every single code sample. Even worse is that some of the introducing examples import abundant code. For example you can find this

import java.util.regex.*;
Note that the imported-by-default
is enough to compile and run the actual sample! Can seem to be trivial, but is still confusing when learning a new Java concept.

An other known trick to increase the number of pages is to copy-and-paste a language API, and pretend it to be a chapter of its own. That trick is tried here at least half ways. The

API is inserted after a very long introductory chapter. However, some useful explanations for that package are included, not to be found found in the original Javadoc.

Still, there are glimpses of light in the book. There are accurate and detailed step by step explanations following all regex syntax. And the pedagogic approach to advance from very simple to finally advanced examples is a good one. Maybe many of the problems are not about the content itself? One rather gets the feeling of a movie uncut by the director, or why not a manuscript released while still being a draft.

The topic at hand, the excellent support for regular expressions from Java 1.4 is appealing indeed. An alternative (and cheap) way of learning regular expressions is to use the excellent, free tutorials on If you want a book, Mastering Regular Expressions from O'Reilly is the Bible. Now in its third edition (2006) and expanded to include special chapters for Perl, NET, Java and more.

At the best Java Regular Expressions is a complement when learning regular expressions, but not more.