About Duffbert...

Duffbert's Random Musings is a blog where I talk about whatever happens to be running through my head at any given moment... I'm Thomas Duff, and you can find out more about me here...

Email Me!

Search This Site!

Custom Search

I'm published!

Co-author of the book IBM Lotus Sametime 8 Essentials: A User's Guide
SametimeBookCoverImage.jpg

Purchase on Amazon

Co-author of the book IBM Sametime 8.5.2 Administration Guide
SametimeAdminBookCoverImage.jpg

Purchase on Amazon

MiscLinks

Visitor Count...



View My Stats

« Book Review - On Demand Computing - Technologies and Strategies by Craig Fellenstein | Main| Has Microsoft killed off its secure computing architecture? »

Book Review - Mastering Regular Expressions by Jeffrey E. F. Friedl

Category Book Reviews

Plain and simple, this is the definitive work on regular expressions...  Mastering Regular Expressions (2nd Edition) by Jeffrey E. F. Friedl (O'Reilly).

Chapter List:  Introduction to Regular Expressions; Extended Introductory Examples; Overview of Regular Expression Features and Flavors; The Mechanics of Expression Processing; Practical Regex Techniques; Crafting an Efficient Expression; Perl; Java; .NET; Index

I've always been a bit reluctant, hesitant, perhaps even fearful to work with regular expressions.  I mean, when you're presented with the following:

s!<emphasis>([0-9+(\.[0-9]+){3})</emphasis>!<inet>$1</inet>!

who wouldn't start to fear for their sanity?

I recently started to explore the subject a bit in the Notes/Domino arena, and I quickly realized I needed more information than I had.  This book fills in all the gaps and then some.  It's one of those rare books that starts at an introductory level, simple enough (given the subject matter) that beginners can start to grasp the concepts.  If you're past the beginning stages, you can head into the chapters on how to write efficient expressions, as well as how arcane commands interact with each other.  If you're not there yet, just keep the book around for reference when you do arrive.  To finish the book off, there are chapters on specific implementations of regular expressions in certain languages.  This ties the whole package together...  introduction through advanced techniques, finished by focused information specific to a particular area of use.  You can't ask for much more.  It's also nice that the 2nd edition came out after Java had implemented the regex package in 1.4, so you get the latest information.  

If you have a copy of this book, make sure your name is in it.  This is not one of those titles you want to have turn up missing at the exact moment you need to figure out a nice single line statement to correct a 100 MB text file...  Highly recommended.

Comments

Gravatar Image1 - This could be a good one to get, I am constantly strugglign with regular expressions, but they are very valuable to work out.

Gravatar Image2 - This is my favorite regular expression. I didn't write (my wife sent it to me) it though; it is pretty slick. It was a good one to learn from.

Validate an email address

function isValidEmailAddress( str ) {

var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid

var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid

if (!reg1.test(str) && reg2.test(str)) { // if syntax is valid

return true;

}

return false;

}


Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::lips::rolleyes:;-)

Want to support this blog or just say thanks?

When you shop Amazon, start your shopping experience here.

When you do that, all your purchases during that session earn me an affiliate commission via the Amazon Affiliate program. You don't have to buy the book I linked you to (although I wouldn't complain!). Simply use that as your starting point.

Thanks!

Thomas "Duffbert" Duff

Ads of Relevance...