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.
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
Posted by Carl At 06:08:23 On 24/02/2005 | - Website - |
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;
}
Posted by Tom At 12:26:51 On 25/02/2005 | - Website - |