When I saw the title of this book, I was excited at the prospect of a book filled with detailed regular expression examples. Unfortunately, it didn't pan out that way.
Obviously, the examples have a heavy bias towards Windows and .NET. If you're using open source languages, you may want to look at this book's precursor Regular Expression Recipies instead. It's essentially the same book, with almost the same list of recipes, but with examples in Perl, PHP and Python.
Each recipe also has a "how it works" section, essentially transcribing the regular expression in English, similar in approach to RegexBuddy's plain English regex trees, though the book uses a flat description rather than a tree. The descriptions are brief though. While all the source code snippets easily take up two or more pages per recipe, the explanation is often barely half a page long.
Most of the recipes solve rather basic problems, organized in six chapters. The first, "Words and Text", deals with finding blank lines, repeated words, words at the start or end of a line, etc. The "URLs and Paths" chapter has examples for finding URLs and file paths, and extracting bits from them. The "CSV and tab-delimited files" has a few recipes for converting between the two and extracting fields.
The "Formatting and Validating" chapter shows how to validate numbers, currency, dates, phone numbers, addresses, etc. The "XML and HTML" chapter has recipes for matching and replacing tags and attributes. Finally, the "Source Code" chapter has a bunch of recipes for manipulating software source code and related files. Most of these tasks are odd jobs that .NET programmers may want to do sometimes.
The book would have been a better deal if it had focused on regular expressions, and left out the many lines of source code, not to mention the redundant copies in several languages. Without the source code, a book of the same size could easily contain 300 examples. That would have made it far more useful for programmers who know how to program, but aren't well-versed in regular expressions.
But don't expect to really learn how regular expressions work from this book. If you develop software for a living, you're better of with a good regular expressions tutorial or a book like "Regular Expressions Cookbook".
Did this website just save you a trip to the bookstore? Please make a donation to support this site, and you'll get a lifetime of advertisement-free access to this site!
Page URL: https://www.regular-expressions.info/bookrecipeswin.html
Page last updated: 21 September 2017
Site last updated: 02 July 2018
Copyright © 2003-2018 Jan Goyvaerts. All rights reserved.
|Regular Expr. Cookbook|
|Teach Yourself Reg. Expr.|
|Mastering Regular Expr.|
|Java Regular Expressions|
|Oracle Regular Expr.|
|Regular Expr. Pocket Ref.|
|Regular Expr. Recipes|
|Regex Recipes for Windows|
|Regular Expressions Quick Start|
|Regular Expressions Tutorial|
|Replacement Strings Tutorial|
|Applications and Languages|
|Regular Expressions Examples|
|Regular Expressions Reference|
|Replacement Strings Reference|
|About This Site|
|RSS Feed & Blog|