Mastering Regular Expressions, 3rd Ed., O'Reilly
Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio
|
Contents |
C# Online.NET Book Review
Regular expressions are a blessing to some and the bane of many others. That is, some people know how to use them and some do not. Regular expressions are supported by most .NET languages, Java, Javascript, Visual Studio, many editors, and utilities. Yet, they remain a mystery to many programmers and developers.
Web developers—especialy—should master regular expression pattern matching for log analysis, parsing HTML and XML tags, scraping, validating, and dozens of other common string processing tasks. My own latest project involved using regular expressions in C# to scrape Web pages and load them into a SQL Server database. My public library has a terrible Web interface; so, I wrote my own client with more power and convenience. It would have been very difficult and time consuming without using regex and without this book.
Mastering Regular Expressions is now in its third edition. I have been a fan of the book for many years. In fact, I own all three editions. It is the best book on regular expressions available; because, it teaches you how to think in regex. The reader learns to apply regex to solve problems. So, if you only want a quickie pocket reference, this book will not meet your needs.
The ideal reader has already been exposed to regular expressions and wants to become a serious regex user. The book does not really teach beginning regular expressions but how to tap their power and use them efficiently. So, the beginner may want to become familiar with regular expressions before attempting to master them with this book. The author makes this arcane, difficult discipline accessible; but, he does not start at the beginning.
Generally, the book is not a reference book although it does include chapters dedicated to the most popular programming languages like .NET, Java, Perl, and PHP. These chapters provide a lot of implementation-specific information which is difficult to round up elsewhere. The third edition has been upgraded with a rewritten Java chapter covering new Java features and third-party packages and a new PHP chapter.
Specifically for .NET developers, the book features a complete tabular overview of the .NET variety of regular expressions. And, .NET 2.0 features including class named capture, RegexOptions, and subtraction are covered in detail.
Bottom line
Mastering Regular Expressions is a classic, a treasure, and as essential to your cube as a chair.
Publisher's description
Written in the lucid, entertaining tone that makes a complex, dry topic become crystal-clear to programmers, and sprinkled with solutions to complex real-world problems, Mastering Regular Expressions, Third Edition offers a wealth of information that you can put to immediate use. Full Description
Regular expressions are an extremely powerful tool for manipulating text and data. They are now standard features in a wide range of languages and popular tools, including Perl, Python, Ruby, Java, VB.NET and C# (and any language using the .NET Framework), PHP, and MySQL.
If you don't use regular expressions yet, you will discover in this book a whole new world of mastery over your data. If you already use them, you'll appreciate this book's unprecedented detail and breadth of coverage. If you think you know all you need to know about regular expressions, this book is a stunning eye-opener.
As this book shows, a command of regular expressions is an invaluable skill. Regular expressions allow you to code complex and subtle text processing that you never imagined could be automated. Regular expressions can save you time and aggravation. They can be used to craft elegant solutions to a wide range of problems. Once you've mastered regular expressions, they'll become an invaluable part of your toolkit. You will wonder how you ever got by without them.
Yet despite their wide availability, flexibility, and unparalleled power, regular expressions are frequently underutilized. Yet what is power in the hands of an expert can be fraught with peril for the unwary. Mastering Regular Expressions will help you navigate the minefield to becoming an expert and help you optimize your use of regular expressions.
Mastering Regular Expressions, Third Edition, now includes a full chapter devoted to PHP and its powerful and expressive suite of regular expression functions, in addition to enhanced PHP coverage in the central "core" chapters. Furthermore, this edition has been updated throughout to reflect advances in other languages, including expanded in-depth coverage of Sun's java.util.regex package, which has emerged as the standard Java regex implementation.Topics include:
- A comparison of features among different versions of many languages and tools
- How the regular expression engine works
- Optimization (major savings available here!)
- Matching just what you want, but not what you don't want
- Sections and chapters on individual languages
Written in the lucid, entertaining tone that makes a complex, dry topic become crystal-clear to programmers, and sprinkled with solutions to complex real-world problems, Mastering Regular Expressions, Third Edition offers a wealth information that you can put to immediate use.
About the author(s)
Jeffrey Friedl was raised in the countryside of Rootstown, Ohio, and had aspirations of being an astronomer until one day he noticed a TRS-80 Model I sitting unused in the corner of the chem lab (bristling with a full 16K of RAM, no less). He eventually began using Unix (and regular expressions) in 1980, and earned degrees in Computer Science from Kent (BS) and the University of New Hampshire (MS). He did kernel development for Omron Corporation in Kyoto, Japan for eight years before moving in 1997 to Silicon Valley to apply his regular-expression know-how to financial news and data for a little-known company called "Yahoo!"
When faced with the daunting task of filling his copious free time, Jeffrey enjoys playing Ultimate Frisbee and basketball with friends at Yahoo!, programming his house, and feeding the squirrels and jays in his back yard. He also enjoys spending time with his wife Fumie, and preparing for the Fall 2002 release of their first "software project" together.
Table of Contents (abbreviated)
1: Introduction to Regular Expressions
2: Extended Introductory Examples
3: Overview of Regular Expression Features and Flavors
4: The Mechanics of Expression Processing
5: Practical Regex Techniques
6: Crafting an Efficient Expression
7: Perl
8: Java
9: .NET
10: PHP