Advanced

Review: Regular Expressions Cookbook

Posted by tripwire45 on · 4 comments
A Million Chimpanzees; By James Pyles
Mail this story
Print this story

According to Wikipedia, "In computing, regular expressions provide a concise and flexible means for identifying strings of text of interest, such as particular characters, words, or patterns of characters". If you even dabble in open source, shell scripts, and writing code, you are likely at least somewhat aware of regular expressions. Some people are even really good at using regular expressions, but this method can be a struggle for others. O'Reilly's Cookbook series offers over 100 "recipes" using regular expressions to solve common tasks. The question is, will this cookbook help you whip up the dish you need to serve?

I hate to cave in to the consensus of reviews on the web, but this book is hot! That said, there is a caveat. Despite the fact that the Intended Audience section of the book's front matter states the book is written for anyone who "regularly work(s) with text on a computer, whether that's searching through a pile of documents, manipulating text in a text editor, or developing software...", many of the people who are editing articles, books, or a web page source won't need or want to access the power regular expressions have to offer. Also, a large number of the book's recipes are written for programming languages or for web development, so to make the most out of this book, you'll need to be doing work in those areas.

Full Story

  Nav
» Read more about: Story Type: Reviews; Groups: PHP

» Get new stories by e-mail: nightly or as they are published

« Return to the newswire homepage

  Related stories
» More like this

Comments (4)

The knaves, I pitched this book years ago and they said no, it would appeal to a limited audience. Pf. And here it is at over 500 pages. It's a great reference and it's easy to look things up in it. Most folks learn by doing, I think that anyone who keeps this next to their computer to look up the occasional regex will absorb enough knowledge to write their own without really working at it.
Once you've done a few things with regexps, you'll want to check out Russ Cox regular expression implementation page:

http://swtch.com/~rsc/regexp/

You'll also want to read this gem, on regex security:

http://www.usenix.org/event/woot08/tech/full_papers/drewry/d...

That is, once you have "cookbook" knowledge, you should acquire the full map knowledge.
> The knaves, I pitched this book years ago and they said no, it would appeal to a limited audience. Pf.

I find regexp to be both astounding and incomprehensible. This certainly would be a book for me, were I in any position to need it.
I'll have to get a copy

Post a comment

A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.

Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help

Sign up and post (it is free)  or  Log in and post