Regular Expressions Cookbook and over 1.5 million other books are available for Amazon Kindle . Learn more


or
Sign in to turn on 1-Click ordering.
Trade in Yours
For a £9.13 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
Sorry, this item is not available in
Image not available for
Colour:
Image not available

 
Start reading Regular Expressions Cookbook on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Regular Expressions Cookbook [Paperback]

Jan Goyvaerts , Steven Levithan
5.0 out of 5 stars  See all reviews (2 customer reviews)
RRP: £38.50
Price: £24.64 & this item Delivered FREE in the UK with Super Saver Delivery. See details and conditions
You Save: £13.86 (36%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
Only 4 left in stock (more on the way).
Dispatched from and sold by Amazon. Gift-wrap available.
Want delivery by Wednesday, 22 May? Choose Express delivery at checkout. See Details

Formats

Amazon Price New from Used from
Kindle Edition £19.43  
Paperback £24.64  
Amazon.co.uk Trade-In Store
Did you know you can trade in your old books for an Amazon.co.uk Gift Card to spend on the things you want? Visit the Books Trade-In Store for more details. Learn more.

Book Description

3 Sep 2012 1449319432 978-1449319434 2

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

Frequently Bought Together

Regular Expressions Cookbook + Regular Expression Pocket Reference: Regular Expressions for Perl, Ruby, PHP, Python, C, Java and .NET (Pocket Reference (O'Reilly))
Price For Both: £32.57

Buy the selected items together


Product details

  • Paperback: 612 pages
  • Publisher: O'Reilly Media; 2 edition (3 Sep 2012)
  • Language: English
  • ISBN-10: 1449319432
  • ISBN-13: 978-1449319434
  • Product Dimensions: 17.8 x 3.3 x 23.3 cm
  • Average Customer Review: 5.0 out of 5 stars  See all reviews (2 customer reviews)
  • Amazon Bestsellers Rank: 56,702 in Books (See Top 100 in Books)
  • See Complete Table of Contents

More About the Author

Discover books, learn about writers, and more.

Product Description

Book Description

Detailed Solutions in Eight Programming Languages

About the Author

Jan Goyvaerts runs Just Great Software, where he designs and develops some of the most popular regular expression software. His products include RegexBuddy, the world's only regular expression editor that emulates the peculiarities of 15 regular expression flavors, and PowerGREP, the most feature-rich grep tool for Microsoft Windows.

Steve Levithan works at Facebook as a JavaScript engineer. He has enjoyed programming for nearly 15 years, working in Tokyo, Washington D.C., Baghdad, and Silicon Valley. Steven is a leading JavaScript regular expression expert, and has created a variety of open source regular expression tools including RegexPal and the XRegExp library.



Customer Reviews

4 star
0
3 star
0
2 star
0
1 star
0
5.0 out of 5 stars
5.0 out of 5 stars
Most Helpful Customer Reviews
5.0 out of 5 stars Excellent 16 Feb 2013
Format:Paperback|Amazon Verified Purchase
Most modern programming languages have Regular Expressions as standard. This book will quickly help you to make full use of this powerful facility.
Comment | 
Was this review helpful to you?
1 of 2 people found the following review helpful
5.0 out of 5 stars Regular Expressions 22 Oct 2012
By Gordon
Format:Paperback|Amazon Verified Purchase
Very comprehensive and clear in everything it covers. I would have liked an appendix that listed the operators with simple examples. Even so this will be very useful.
Comment | 
Was this review helpful to you?
Most Helpful Customer Reviews on Amazon.com (beta)
Amazon.com: 4.6 out of 5 stars  21 reviews
7 of 7 people found the following review helpful
5.0 out of 5 stars if you have regular contact with regular expressions, you need this book 4 Sep 2012
By R. Friesel Jr. - Published on Amazon.com
Format:Paperback
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.
5 of 5 people found the following review helpful
5.0 out of 5 stars The ultimate regular expressions cheat sheet 19 Sep 2012
By Michael Kim - Published on Amazon.com
Format:Paperback
The authors say it best when they say that the book is intended for those who:

"regularly work with text on a computer, whether that's searching through a pile of documents, manipulating text in a text editor, or developing software that needs to search through or manipulate text."

The first three chapters of this book cover useful tools, basic regular expression skills, and programming with regular expressions. Chapters 4 through 9 contain the practical regular expressions recipes. The programming languages that are covered in this book are C#, Java, JavaScript, PHP, Perl, Python, Ruby, and VB.NET. Every recipe that is in the book has solutions and explanations for all eight languages.

The recipes are organized and easy to look up. For example, finding regular expressions that deal with validation, words, lines, URLs, and etc can be easily located in the table of contents. The author's tone is straightforward, direct, and informative. This is not the kind of book where you read from start to finish, but rather a book where you just skim through to find the recipe that you need in whatever given situation.

With all the languages that the book covers, there are just too many languages to put into a single book. I feel as though instead of having a book with all the languages, it would be better to have a book with a single language. However, I must give praise on how well the authors were able to consolidate detailed solutions in 8 programming languages.

For everything that the book is and everything that it covers, the book offers a lot of information at a bargain. If you work with regular expressions and need a reference book, this book is definitely the way to go.
7 of 8 people found the following review helpful
4.0 out of 5 stars Good Tools 1 Sep 2012
By Eric Chou - Published on Amazon.com
Format:Paperback
O'Reilly cookbooks are awesome. But just like I don't read the recipes cover-to-cover in regular cookbooks, I don't read all the recipes in the O'Reilly cookbooks either. Also just like regular cookbooks, the day before Thanksgiving is not a good time to open the cookbook for the first time, I at least glance thru all the recipes to know what is there, pick out a few that I can use right away, and dog ear the ones I think I will come back to. So here are the criteria that I review this book with:

1. Easy Navigation: Yep, this book is easy to navigate. If I need to do, say form validation, I know I should start at Chapter 4 "Validation and Formatting".
2. Clear and precise explanation: Yes, I think the explanation are short and precise to the topic of discussion.
3. Pointer for more information: This is hard to do, but the book has a section on "See Also" for correlation between recipes and a general pointer toward 'Master Regular Expression' in the introduction chapter.
4. Easy Reading: Hum.. here is more of a wish list of mine, I wish the book is broken down into different books by language. The book covers these languages, VB.NET, C#, Java, JavaScript, XRegExp, PHP, Perl, Python, and Ruby. I typically skip down to Python and occasionally stop at C# and PHP. The book is over 600 pages and listed at $49.99. I would have been happy to pay 1/5 of the price to get one that just focus on Python, and another 1/5 of the price to get one on PHP.

All in all, it is a good value and a keeper on the bookshelf. But I really think it should be broken down into language-specific cookbook as most reader probably use only one or two languages on a daily basis. With today's print-on-demand, e-book format, I think it would be very minimal work for the author and a whole lot of less skipping for the readers. Just my 2 cents.
Were these reviews helpful?   Let us know
Search Customer Reviews
Only search this product's reviews

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 

Search Customer Discussions
Search all Amazon discussions
   


Listmania!

Create a Listmania! list

Look for similar items by category


Feedback


Amazon.co.uk Privacy Statement Amazon.co.uk Delivery Information Amazon.co.uk Returns & Exchanges