Book description
Regular expressions are an extremely powerful tool for manipulating text and data. They are now standard features in a wide range of languages and popular tools, including Perl, Python, Ruby, Java, VB.NET and C# (and any language using the .NET Framework), PHP, and MySQL.
If you don't use regular expressions yet, you will discover in this book a whole new world of mastery over your data. If you already use them, you'll appreciate this book's unprecedented detail and breadth of coverage. If you think you know all you need to know about regularexpressions, this book is a stunning eye-opener.
As this book shows, a command of regular expressions is an invaluable skill. Regular expressions allow you to code complex and subtle text processing that you never imagined could be automated. Regular expressions can save you time and aggravation. They can be used to craft elegant solutions to a wide range of problems. Once you've mastered regular expressions, they'll become an invaluable part of your toolkit. You will wonder how you ever got by without them.
Yet despite their wide availability, flexibility, and unparalleled power, regular expressions are frequently underutilized. Yet what is power in the hands of an expert can be fraught with peril for the unwary. Mastering Regular Expressions will help you navigate the minefield to becoming an expert and help you optimize your use of regular expressions.
Mastering Regular Expressions, Third Edition, now includes a full chapter devoted to PHP and its powerful and expressive suite of regular expression functions, in addition to enhanced PHP coverage in the central "core" chapters. Furthermore, this edition has been updated throughout to reflect advances in other languages, including expanded in-depth coverage of Sun's java.util.regex package, which has emerged as the standard Java regex implementation.Topics include:
- A comparison of features among different versions of many languages and tools
- How the regular expression engine works
- Optimization (major savings available here!)
- Matching just what you want, but not what you don't want
- Sections and chapters on individual languages
Written in the lucid, entertaining tone that makes a complex, dry topic become crystal-clear to programmers, and sprinkled with solutions to complex real-world problems, Mastering Regular Expressions, Third Edition offers a wealth information that you can put to immediateuse.
Reviews of this new edition and the second edition:
"There isn't a better (or more useful) book available on regular expressions."
--Zak Greant, Managing Director, eZ Systems
"A real tour-de-force of a book which not only covers the mechanics of regexes in extraordinary detail but also talks about efficiency and the use of regexes in Perl, Java, and .NET...If you use regular expressions as part of your professional work (even if you already have a good book on whatever language you're programming in) I would strongly recommend this book to you."
--Dr. Chris Brown, Linux Format
"The author does an outstanding job leading the reader from regexnovice to master. The book is extremely easy to read and chock full ofuseful and relevant examples...Regular expressions are valuable toolsthat every developer should have in their toolbox. Mastering RegularExpressions is the definitive guide to the subject, and an outstandingresource that belongs on every programmer's bookshelf. Ten out of TenHorseshoes."
--Jason Menard, Java Ranch
Publisher resources
Table of contents
- Cover Page
- Title Page
- Copyright Page
- Dedication
- Table of Contents
- Preface
- 1: Introduction to Regular Expressions
- 2: Extended Introductory Examples
- 3: Overview of Regular Expression Features and Flavors
-
4: The Mechanics of Expression Processing
- Start Your Engines!
- Match Basics
- Regex-Directed Versus Text-Directed
- Backtracking
-
More About Greediness and Backtracking
- Problems of Greediness
- Multi-Character “Quotes”
- Using Lazy Quantifiers
- Greediness and Laziness Always Favor a Match
- The Essence of Greediness, Laziness, and Backtracking
- Possessive Quantifiers and Atomic Grouping
- Possessive Quantifiers, ?+, *+, ++, and {m,n}+
- The Backtracking of Lookaround
- Is Alternation Greedy?
- Taking Advantage of Ordered Alternation
- NFA, DFA, and POSIX
- Summary
- 5: Practical Regex Techniques
- 6: Crafting an Efficient Expression
-
7: Perl
- Regular Expressions as a Language Component
- Perl’s Regex Flavor
- Regex-Related Perlisms
- The qr/···/ Operator and Regex Objects
- The Match Operator
- The Substitution Operator
- The Split Operator
-
Fun with Perl Enhancements
- Using a Dynamic Regex to Match Nested Pairs
- Using the Embedded-Code Construct
- Using local in an Embedded-Code Construct
- A Warning About Embedded Code and my Variables
- Matching Nested Constructs with Embedded Code
- Overloading Regex Literals
- Problems with Regex-Literal Overloading
- Mimicking Named Capture
- Perl Efficiency Issues
- Final Comments
- 8: Java
- 9: .NET
- 10: PHP
- Index
- About the Author
- Colophon
- Footnotes
Product information
- Title: Mastering Regular Expressions, 3rd Edition
- Author(s):
- Release date: August 2006
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596528126
You might also like
book
Regular Expressions Cookbook, 2nd Edition
Take the guesswork out of using regular expressions. With more than 140 practical recipes, this cookbook …
book
Regular Expressions Cookbook
This cookbook provides more than 100 recipes to help you crunch data and manipulate text with …
video
Ultimate Go Programming, Second Edition
16+ Hours of Video Instruction Ultimate Go Programming LiveLessons, Second Edition, provides an intensive, comprehensive, and …
book
Learning Go, 2nd Edition
Go has rapidly become the preferred language for building web services. Plenty of tutorials are available …