Buying Options
Mastering Regular Expressions, Second Edition
This product is no longer available.

Please consider the latest edition.

Product Editions

  1. Mastering Regular Expressions, Third Edition - August 2006
  2. Mastering Regular Expressions, Second Edition - July 2002 (out of print)
  3. Mastering Regular Expressions - January 1997 (out of print)
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, Java, VB.NET and C# (and any language using the .NET Framework), PHP, Python, Ruby, Tcl, MySQL, awk, and Emacs.

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.

Full Description
Table of Contents
  1. Chapter 1 Introduction to Regular Expressions

    1. Solving Real Problems

    2. Regular Expressions as a Language

    3. The Regular-Expression Frame of Mind

    4. Egrep Metacharacters

    5. Expanding the Foundation

    6. Personal Glimpses

    7. Quiz Answer

  2. Chapter 2 Extended Introductory Examples

    1. About the Examples

    2. Matching Text with Regular Expressions

    3. Modifying Text with Regular Expressions

    4. Quiz Answers

  3. Chapter 3 Overview of Regular Expression Features and Flavors

    1. A Casual Stroll Across the Regex Landscape

    2. Care and Handling of Regular Expressions

    3. Strings, Character Encodings, and Modes

    4. Common Metacharacters and Features

    5. Guide to the Advanced Chapters

  4. Chapter 4 The Mechanics of Expression Processing

    1. Start Your Engines!

    2. Match Basics

    3. Regex-Directed Versus Text-Directed

    4. Backtracking

    5. More About Greediness and Backtracking

    6. NFA, DFA, and POSIX

    7. Summary

    8. Quiz Answers

  5. Chapter 5 Practical Regex Techniques

    1. Regex Balancing Act

    2. A Few Short Examples

    3. HTML-Related Examples

    4. Extended Examples

  6. Chapter 6 Crafting an Efficient Expression

    1. A Sobering Example

    2. A Global View of Backtracking

    3. Benchmarking

    4. Common Optimizations

    5. Techniques for Faster Expressions

    6. Unrolling the Loop

    7. The Freeflowing Regex

    8. In Summary: Think!

    9. Quize Answers

  7. Chapter 7 Perl

    1. Regular Expressions as a Language Component

    2. Perl's Regex Flavor

    3. Regex-Related Perlisms

    4. The qr/ยทยทยท/ Operator and Regex Objects

    5. The Match Operator

    6. The Substitution Operator

    7. The Split Operator

    8. Fun with Perl Enhancements

    9. Perl Efficiency Issues

    10. Final Comments

  8. Chapter 8 Java

    1. Judging a Regex Package

    2. Object Models

    3. Packages, Packages, Packages

    4. Sun's Regex Package

    5. A Quick Look at Jakarta-ORO

  9. Chapter 9 .NET

    1. .NET's Regex Flavor

    2. Using .NET Regular Expressions

    3. Core Object Details

    4. Static "Convenience" Functions

    5. Support Functions

    6. Advanced .NET

  1. About the Author

  2. Colophon

View Full Table of Contents
Product Details
Title:
Mastering Regular Expressions, Second Edition
By:
Jeffrey E.F. Friedl
Publisher:
O'Reilly Media
Formats:
  • Print
Print Release:
July 2002
Pages:
496
Print ISBN:
978-0-596-00289-3
| ISBN 10:
0-596-00289-0
Customer Reviews
Colophon

Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animals on the cover of Mastering Regular Expressions, Second Edition are owls. There are two families and approximately 180 speices of these birds of prey distributed throughout the world, with the exception of Antarctica. Most species of owls are nocturnal hunters, feeding entirely on live animals, ranging in size from insects to hares.

Because they have little ablility to move their large, forward-facing eyes, owls must move their entire heads in order to look around. They can roate their heads up to 270 degrees, and some can turn their heads completely upside down. Among the physical adaptations that enhance owls' effectiveness as hunters is their extreme sensitivity to the frequency and direction of sounds. Many species of owl have asymmetrical ear placement, which enables them to more easiliy locate their prey in dim or dark light. Once they've pinpointed the location, the owl's soft feathers allow them to fly noiselessly and thus to surprise their prey.

While people have traditionally anthropomorphized birds of prey as evil and coldblooded creatures, owls are viewed differently in human mythology. Perhaps because their large eyes give them the appearance of intellectual depth, owls have been portrayed in folklore through the ages as wise creatures. Jeffrey E. F. Friedl was the production editor for Mastering Regular Expressions, Second Edition. Sarah Jane Shangraw was the proofreader. Jane Ellin provided quality control.

Edie Freedman designed the cover of this book. The cover image is a 19th-century engraving from the Dover Pictorial Archive. Emma Colby produced the cover layout with QuarkXPress 4.1 using Adobe's ITC Garamond font.

The text was prepared by Jeffrey Friedl in a hybrid markup of his own design, mixing SGML, raw troff, raw PostScript, and his own markup. A home-grown filter translated the latter to the other, lower-level markups, the result of which was processed by a locally-modified version of James Clark's g gtroff, producing camera-ready PostScript for O'Reilly.

Ken Lunde of Adobe Systems provided special font and typsetting help, including custom-designed characters and Japanese characters from Adobe System's Heisei Mincho W3 typeface.

The text and heading fonts are ITC Garamond Light and Garamond Book; the code font is Constant Willison. The illustrations that appear in the book were produced by Chris Reilly, Robert Romano, and Jessamyn Read using Macromedia FreeHand 9 and Adobe Photoshop 6.

  • Book cover of Mastering Regular Expressions