Start reading Regular Expression Pocket Reference on the free Kindle Reading App or on your Kindle in under a minute. Don't have a Kindle? Get your Kindle here.

Deliver to your Kindle or other device

Enter a promotion code
or gift card

Try it free

Sample the beginning of this book for free

Deliver to your Kindle or other device

Sorry, this item is not available in
Image not available for
Image not available

Regular Expression Pocket Reference [Kindle Edition]

Tony Stubblebine
4.2 out of 5 stars  See all reviews (49 customer reviews)

Digital List Price: $6.99 What's this?
Print List Price: $14.99
Kindle Price: $4.89
You Save: $10.10 (67%)

Free Kindle Reading App Anybody can read Kindle books—even without a Kindle device—with the FREE Kindle app for smartphones, tablets and computers.

To get the free app, enter your email address or mobile phone number.


Amazon Price New from Used from
Kindle Edition $4.89  
Paperback $12.75  
Shop the new
New! Introducing the, a hub for Software Developers and Architects, Networking Administrators, TPMs, and other technology professionals to find highly-rated and highly-relevant career resources. Shop books on programming and big data, or read this week's blog posts by authors and thought-leaders in the tech industry. > Shop now
There is a newer edition of this item:
Regular Expression Pocket Reference: Regular Expressions for Perl, Ruby, PHP, Python, C, Java and .NET (Pocket Reference (O'Reilly)) Regular Expression Pocket Reference: Regular Expressions for Perl, Ruby, PHP, Python, C, Java and .NET (Pocket Reference (O'Reilly)) 4.2 out of 5 stars (49)
Available for download now.

Book Description

Regular expressions are such a powerful tool for manipulating text and data that anyone who uses a computer can benefit from them. Composed of a mixture of symbols and text, regular expressions can be an outlet for creativity, for brilliant programming, and for the elegant solution. While a command of regular expressions is an invaluable skill, all there is to know about them fills a very large volume, and you don't always have time to thumb through hundreds of pages each time a question arises. The answer is the Regular Expression Pocket Reference. Concise and easy-to-use, this little book is the portable companion to Mastering Regular Expressions.

This handy guide offers programmers a complete overview of the syntax and semantics of regular expressions that are at the heart of every text-processing application. Ideal as an introduction for beginners and a quick reference for advanced programmers, Regular Expression Pocket Reference is a comprehensive guide to regular expression APIs for C, Perl, PHP,Java, .NET, Python, vi, and the POSIX regular expression libraries.

O'Reilly's Pocket References have become a favorite among programmers everywhere. By providing a wealth of important details in a concise, well-organized format, these handy books deliver just what you need to complete the task at hand. When you've reached a sticking point and need to get to a solution quickly, the new Regular Expression Pocket Reference is the book you'll want to have.

Editorial Reviews

Book Description

Regular Expressions for Perl, Ruby, PHP, Python, C, Java, and .NET

About the Author

Tony Stubblebine, writes Perl and regular expressions for O'Reilly. Previously he held the titles of Web Peasant and Rogue Developer while hacking Perl for MasterCard International. He is also the Social Director and Senior Nightlife Correspondent for the O'Reilly Network.

Product Details

  • File Size: 320 KB
  • Print Length: 112 pages
  • Simultaneous Device Usage: Unlimited
  • Publisher: O'Reilly Media; 1 edition (August 27, 2003)
  • Sold by: Amazon Digital Services, Inc.
  • Language: English
  • ASIN: B0093T4MJE
  • Text-to-Speech: Enabled
  • X-Ray:
  • Word Wise: Not Enabled
  • Lending: Not Enabled
  • Amazon Best Sellers Rank: #450,364 Paid in Kindle Store (See Top 100 Paid in Kindle Store)
  •  Would you like to give feedback on images?

Customer Reviews

Most Helpful Customer Reviews
31 of 31 people found the following review helpful
4.0 out of 5 stars A review of "Regular Expression Pocket Reference" July 12, 2005
One of the most difficult things when working with regular expressoins -- at least for me -- is dealing with different implementations (i.e., Perl, Java, Python, PHP, UNIX tools, etc.) The basics of regexes and pattern matching don't vary all that much, but each implementation is just different enough that the smae line of code can yield different results. If you work with more than one of these implementations, keeping track of differences in metacharacters and metasequences can be nearly impossible. This is especially true when -- as is the case with me -- you deal with regexes somewhat intermittently.

This is one of the main reasons why the "Regular Expression Pocket Reference"

was written and this is why I keep it close at hand. This book will not really teach you how to use regexes, nor will it tell you how to use, say, Perl. If, however, you use Perl and you know how to use regexes but just can't remember whether you can disallow backtracking for text matched by a subpattern, then this book will save you quite a bit of time and effort.

If you're wondering what it means to "disallow backtracking for text matched by a subpattern," or when you would want to use it, buy "Mastering Regular Expressions" or a similar title. The "Regular Expression Pocket Reference" is designed to be a quick reference tool, and it serves this purpose very well. I would recommend it especially for those who work with regular expressions intermittently or who work with several different implementations.
Comment | 
Was this review helpful to you?
39 of 40 people found the following review helpful
2.0 out of 5 stars Too many implementations covered December 15, 2003
I love this series of books (the C#, C++ and STL pocket refs are my favorite), but the Regular Expression pocket ref tries to cover too many implementations. You only get about 10 pages for each language so, unless you use multiple implementations (e.g. C#/.NET, Perl, JavaScript, etc), this just isn't good value for money. I returned my copy and printed out a quick reference from one of the many Internet programming sites.
Comment | 
Was this review helpful to you?
33 of 36 people found the following review helpful
4.0 out of 5 stars Great reference, but not a tutorial November 20, 2003
The editorial blurb on this book suggests that it can be used as a tutorial by those new to regular expressions. That's not the case. This book is strictly a reference, albeit a very good one. I bought O'Reilly's "Mastering Regular Expressions" to learn the area, and I use this book as a quick reference. It serves that purpose very well.
Comment | 
Was this review helpful to you?
14 of 15 people found the following review helpful
4.0 out of 5 stars Perfect book for the intermediate regex coder... January 7, 2005
It's nearly impossible to memorize all the minutiae of regular expressions, especially over multiple language implementations. Tony Stubblebine's book Regular Expression Pocket Reference by O'Reilly is a nice way to help you out without digging through endless pages.

Chapter List: About This Book; Introduction To Regexes And Pattern Matching; Perl 5.8; Java (java.util.regex); .NET And C#; Python; PCRE Lib; PHP; vi Editor; JavaScript; Shell Tools; Index

Like most pocket references, this book is small (93 pages), but there's a lot of information packed into a small space. Each implementation chapter covers the metacharacters and metasequences that are supported in the language's implementation of regular expressions. This is followed by the language functions, examples of regular expressions, and a list of additional resources the reader can use to learn more about regular expressions in that language. If you don't know anything about the subject, this book (in my opinion) isn't going to help you out much. It assumes that you already understand the material and you're looking for a reference guide to find quick answers. And that's fine. This book has a definite purpose and target audience, and I think it does a very nice job of hitting the mark.

For me, this would be a perfect companion book to Mastering Regular Expressions (also by O'Reilly). Mastering is considered one of the definitive volumes on the subject, and having this pocket guide on hand to jog your memory on lesser-used points would be perfect.
Comment | 
Was this review helpful to you?
11 of 12 people found the following review helpful
4.0 out of 5 stars Perfect for looking up that question December 7, 2003
If you've ever picked up a copy of O'Reilly's Mastering Regular Expressions, then you'll feel right at home with this book. The Pocket Reference is all about usability, and this book is no exception. If you've never seen Mastering Regular Expressions, then this book takes the most important aspects of that book into about 80 pages.
This book is basically divided into various languages (Perl, C, Java, C#) with examples on how to use regular expressions with each language. In addition to discussing the built-in language specific functions that you should use, there is discussion on the differences and nuances to using regular expressions in the specific language.
If you need a desktop quick reference on regular expressions, then I would highly recommend this book. I have it next to my desk with the .NET section bookmarked. If you need something with a little more depth and explanation, then I would suggest picking up a copy of O'Reilly's Mastering Regular Expressions.
Comment | 
Was this review helpful to you?
7 of 7 people found the following review helpful
5.0 out of 5 stars An Excellent Regex Reference March 10, 2004
I recommend getting this book
if you feel comfortable with regular expressions
and regular expressions are important to you.
As one expects from an O'Reilly Pocket Reference,
this book is compact but still covers a lot of ground.
For a whole bunch of applications, it provides:
* tables of various groupings of regex metacharacters,
summarizing their syntax and meaning;
* summaries of other regex related features,
but not in tabular form;
* examples;
* a few references in case you need to go deeper.
The information is concise and well chosen.
This is a reference,
but in applications where you use regular expressions less,
it may also be useful for expanding your knowledge significantly.
It was for me.
If you wish, take a look at my
more detailed review on Oakland Perl Mongers.
Comment | 
Was this review helpful to you?
Most Recent Customer Reviews
1.0 out of 5 stars Regular Expressions Review
Overall, I did not like the book, especially the beginning. I do not feel it went over the meaning of everything well, at all. Read more
Published 25 days ago by jessie
5.0 out of 5 stars Five Stars
arrived as described
Published 4 months ago by James Todd
5.0 out of 5 stars Good pocket reference
Good pocket reference; used it several times in the past few weeks since I received it.
Published 6 months ago by Carl
5.0 out of 5 stars great reference!
Why it's good:
- really short reference, in just a bit over 100 pages, not much blah-blah, straight to the point, to what you need. Read more
Published 7 months ago by Cristi S.
3.0 out of 5 stars I use it occasionally
I would really prefer a reference guide that is designed with an index of various regular expressions. Read more
Published 10 months ago by dw
3.0 out of 5 stars not too helpful, but satisfactory.
Not too helpful. Getting an individual guide for the use of regular expressions within a particular language would be easier to use.
Published 11 months ago by Bob Roberts
3.0 out of 5 stars It's Precise
If you're looking for a text that is exactly to the point based on your environment, then this is what you're looking for.
Published 14 months ago by ACE
5.0 out of 5 stars Gift for a coworker
We always go back and forth about the proper way to do a certain regex. This will help solve some arguments.
Published 16 months ago by S. Tanner
5.0 out of 5 stars Pocket Reference
This was a request from our programming manager for his staff. They are in the process of learning a new program process.
Published 16 months ago by Chloe
4.0 out of 5 stars If you know some regex, great, but not for beginners.
I bought the kindle version, I'd say if you have a little experience with Regex this is better. Once I had some practice, this book was very helpful. Read more
Published 17 months ago by Stephen Power
Search Customer Reviews
Search these reviews only

More About the Author

Discover books, learn about writers, read author blogs, and more.

What Other Items Do Customers Buy After Viewing This Item?


There are no discussions about this product yet.
Be the first to discuss this product with the community.
Start a new discussion
First post:
Prompts for sign-in

Look for Similar Items by Category