Regular Expressions Cookbook: Detailed Solutions in Eight Programming Languages Info

Check out top reviews for #title by Author. According to our community #title has been rated #Ratingcount# of #reviewNumber# reviews. If you want to download the best programming guides, Android resources, and Java books our community will help you take the right decision. Read&Download Regular Expressions Cookbook: Detailed Solutions in Eight Programming Languages by Jan Goyvaerts,Steven Levithan Online


Take the guesswork out of using regular expressions.
With more than 140 practical recipes, this cookbook provides everything
you need to solve a wide range of real-world problems. Novices will
learn basic skills and tools, and programmers and experienced users will
find a wealth of detail. Each recipe provides samples you can use right
away.

This revised edition covers the regular expression flavors
used by C#, Java, JavaScript, Perl, PHP, Python, Ruby, and VB.NET.
You’ll learn powerful new tricks, avoid flavor-specific gotchas,
and save valuable time with this huge library of practical
solutions.

  • Learn regular expressions basics through a
    detailed tutorial
  • Use code listings to implement regular
    expressions with your language of choice
  • Understand how regular
    expressions differ from language to language
  • Handle common user
    input with recipes for validation and formatting
  • Find and
    manipulate words, special characters, and lines of text
  • Detect
    integers, floating-point numbers, and other numerical
    formats
  • Parse source code and process log files
  • Use
    regular expressions in URLs, paths, and IP addresses
  • Manipulate
    HTML, XML, and data exchange formats
  • Discover little-known
    regular expression tricks and techniques

Average Ratings and Reviews
review-bg

4.10

204 Ratings

5

4

3

2

1


Ratings and Reviews From Market


client-img 4.2
17
9
4
0
2
client-img 4
1
0
0
1
1
client-img 4.09
58
67
44
2
1

Reviews for Regular Expressions Cookbook: Detailed Solutions in Eight Programming Languages:

5

Aug 28, 2012

Although I run the risk of fawning all over this book here, Jan Goyvaerts and Steven Levithan's Regular Expressions Cookbook (Second Edition) (O'Reilly, 2012) is a technical text that I will gladly describe using words like "essential" and "indispensable" and "invaluable". It should be on every working programmer's bookshelf, if not on her desk. It is exhaustive and rigorous, covering the major regex flavors across eight popular/widespread general purpose languages. [1] If your work brings you Although I run the risk of fawning all over this book here, Jan Goyvaerts and Steven Levithan's Regular Expressions Cookbook (Second Edition) (O'Reilly, 2012) is a technical text that I will gladly describe using words like "essential" and "indispensable" and "invaluable". It should be on every working programmer's bookshelf, if not on her desk. It is exhaustive and rigorous, covering the major regex flavors across eight popular/widespread general purpose languages. [1] If your work brings you in regular contact with regular expressions, then you need easy access to this book.

To begin with, Goyvaerts and Levithan present an in-depth discussion of each regex feature, starting with the very basics (e.g., making matches against literal expressions) and working up into some pretty sophisticated topics (e.g., writing parsers). True to the title, their approach is a "cookbook" style: a general problem is stated, a solution is presented (or multiple solutions, if that's what it takes), and then they go into an almost painful (but neatly sectioned) level of detail about the solution, describing it token-for-token in some cases. Now, by "neatly sectioned" I mean that their discussion of each solution is broken down by language [2] wherein they are careful to point out flavor- and/or language-specific nuances, quirks, bugs, and/or unique features. They are very careful about this part--if a particular feature does not work in a language (e.g., how JavaScript lacks named capturing groups) then they show you how to work around that deficiency; but perhaps more importantly, if a feature is unique to a language, they point it out as such and caution you against using them (i.e., to keep your regexes general and portable). [3]

Later chapters (i.e., 4 through 9) look at more specific problems--e.g., performing validation on email addresses, [4] dealing with Roman numerals, combing for text in the Apache Common Log Format, or parsing URLs. The recipes are all cross-referenced with each other, so if a particular solution really only solves about 75% of your problem, they're prepared to point you in the right direction. They get right to the point, and then tell you where to go for more. What else can be said about these chapters except that they're like the magnificent arsenal you'll be wishing for when the text zombies swarm at your gate.

All of this makes the Regular Expressions Cookbook very skimmable. It is easy to pick it up, find the particular recipe that is going to help you out of a jam, and power through with that solution in hand. Do you "just" need a quick JavaScript solution? Done. Curious how it might compare to the solution in Java or Ruby? No problem. You skim the surface, or you can go as deep as you need [5] on some very narrow and specific sub-sub-subject within the corpus of regular expressions knowledge. (That being said, take their advice and be sure to read the first three chapters so that you are properly equipped for those deep dives later on.)

As I said before, if your work regularly brings you in contact with regular expressions, you'll want to arm yourself with this. Highly recommended.

---

[1] Goyvaerts and Levithan define the regex flavors as: .NET, Java, JavaScript, PCRE, Perl, Python, and Ruby; the specific languages covered include: C#, Java, JavaScript (and Levithan's XRegExp library), PHP, Perl, Python, Ruby, and VB.NET. They also have a list in chapter 3 of 11 other languages which--while not specifically covered--are applicable because they adhere to one of the flavors.

[2] I should add "where appropriate" here, and note that the per-language sections in each discussion are much more common in the early chapters (2 and 3, with a pretty sharp drop-off starting in 4). This is because they're covering the fundamentals, and there's a lot more in the way of quirks and nuances to tread lightly around at this point.

[3] In other words: they remind you not to get too clever. "Sure you could do that as a one-liner... but no one's going to know what that means next week. Not even you."

[4] Which, validating an email address is not as easy as it sounds.

[5] Or as deep as you want, if you're in to that sort of thing.

---

Full disclosure: I received an electronic copy from the publisher in exchange for writing a review. ...more
4

Jan 18, 2017

Contains a clear introduction to what regular expressions are and how to use them. It also covers common pitfalls when working with
regexes like explosive backtracking and the platform specific differences in behavior. For this reason, we are shown the solution expressions for the following languages - C#, Java, JavaScript, PHP, Perl, Python, Ruby, and VB.NET.

Contains (100+) examples for most of the common regular expression use cases like validating email addresses, parsing a Common Log Format Contains a clear introduction to what regular expressions are and how to use them. It also covers common pitfalls when working with
regexes like explosive backtracking and the platform specific differences in behavior. For this reason, we are shown the solution expressions for the following languages - C#, Java, JavaScript, PHP, Perl, Python, Ruby, and VB.NET.

Contains (100+) examples for most of the common regular expression use cases like validating email addresses, parsing a Common Log Format file, or extracting a query from a URL. This is a good reference to keep on hand for finding solutions to common problems that can be solved via regular expressions. ...more
5

Jan 03, 2019

I read until the end of chapter 5, and skim to the end.
This book is very excellent book to learn regular expression, this book and “mastering regular expression” is must-read regex books.
5

Oct 07, 2012

"Regular Expressions Cookbook" covers reg exp syntax in different languages and patterns for building them. I had read O'Reilly's "Mastering Regular Expressions" years ago and liked it a lot. I feel the same way about this book.

While the book doesn't require regular expression experience, it is a tough read if you are coming in completely fresh. At least read a tutorial online first. It is a great book for building on basic or advanced knowledge.

Chapter two is like a book in itself. The author "Regular Expressions Cookbook" covers reg exp syntax in different languages and patterns for building them. I had read O'Reilly's "Mastering Regular Expressions" years ago and liked it a lot. I feel the same way about this book.

While the book doesn't require regular expression experience, it is a tough read if you are coming in completely fresh. At least read a tutorial online first. It is a great book for building on basic or advanced knowledge.

Chapter two is like a book in itself. The author says you can skip this chapter if you've read "Mastering Regular Expressions" cover to cover. That's me! Yet I still learned a couple things in chapter 2.

The rest of the book is recipes. Problem, solution, flavors, languages it works in, variations and lots of description. Some recipes were similar/repetitive. But a 500 page pattern book isn't intended to be read cover to cover. The recipes had a great range from zip codes to ISBN numbers to VAT. I like how the examples build up in complexity so they don't start out being overwhelming.

I learned a lot about regular expressions and patterns. And what grep stands for (g/re/p in ed). I also learned about some new Java 7 features like named captures. I liked the parts on performance and Big O notation.

Now I have two really good regular expression books plus the pocket reference. Thanks O'Reilly!


---
Disclosure: I received a copy of this book from the publisher in exchange for writing this review on behalf of CodeRanch. ...more
4

Jun 27, 2015

I read the first couple of chapters, and then skimmed through the rest of the various recipes. It has good coverage of how regular expressions work in general, and the recipes cover a broad range of use cases. It was a good refresher on some areas which I hadn't used much.
4

Nov 14, 2012

A very practical approach, especially the language specific caveats..
4

May 18, 2012

Each and every symbol and constructs making a regular expeession is explained well...you can start feeling confident by reading the first chapter itself..
Strongly recommended
5

Feb 28, 2012

Great read! Lots of insightful tips n tidbits!
Definitely a keeper for me!

Best Books from your Favorite Authors & Publishers

compare-icon compare-icon
Thousands of books

Take your time and choose the perfect book.

review-icon review-icon
Read Reviews

Read ratings and reviews to make sure you are on the right path.

vendor-icon vendor-icon
Multiple Stores

Check price from multiple stores for a better shopping experience.

gift-icon

Enjoy Result