Cover image for Regular Expression Pocket Reference

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.

Table of Contents

  1. Regular Expression Pocket Reference
    1. SPECIAL OFFER: Upgrade this ebook with O’Reilly
    2. 1. Regular Expression Pocket Reference
      1. 1.1. About This Book
        1. 1.1.1. Conventions Used in This Book
        2. 1.1.2. Acknowledgments
      2. 1.2. Introduction to Regexes and Pattern Matching
        1. 1.2.1. Regex Metacharacters, Modes, and Constructs
          1. 1.2.1.1. Character representations
          2. 1.2.1.2. Character classes and class-like constructs
          3. 1.2.1.3. Anchors and zero-width assertions
          4. 1.2.1.4. Comments and mode modifiers
          5. 1.2.1.5. Grouping, capturing, conditionals, and control
        2. 1.2.2. Unicode Support
      3. 1.3. Perl 5.8
        1. 1.3.1. Supported Metacharacters
        2. 1.3.2. Regular Expression Operators
          1. qr// (Quote Regex)
          2. m// (Matching)
          3. s/// (Substitution)
          4. split
        3. 1.3.3. Unicode Support
        4. 1.3.4. Examples
        5. 1.3.5. Other Resources
      4. 1.4. Java (java.util.regex)
        1. 1.4.1. Supported Metacharacters
        2. 1.4.2. Regular Expression Classes and Interfaces
          1. java.lang.String
          2. java.util.regex.Pattern
          3. java.util.regex.Matcher
          4. java.util.regex.PatternSyntaxException
          5. java.lang.CharSequence
        3. 1.4.3. Unicode Support
        4. 1.4.4. Examples
        5. 1.4.5. Other Resources
      5. 1.5. .NET and C#
        1. 1.5.1. Supported Metacharacters
        2. 1.5.2. Regular Expression Classes and Interfaces
          1. Regex
          2. Match
          3. Group
        3. 1.5.3. Unicode Support
        4. 1.5.4. Examples
        5. 1.5.5. Other Resources
      6. 1.6. Python
        1. 1.6.1. Supported Metacharacters
        2. 1.6.2. re Module Objects and Functions
          1. Module Functions
          2. RegExp
          3. Match Objects
        3. 1.6.3. Unicode Support
        4. 1.6.4. Examples
        5. 1.6.5. Other Resources
      7. 1.7. PCRE Lib
        1. 1.7.1. Supported Metacharacters
        2. 1.7.2. PCRE API
          1. PCRE API Synopsis
        3. 1.7.3. Unicode Support
        4. 1.7.4. Examples
        5. 1.7.5. Other Resources
      8. 1.8. PHP
        1. 1.8.1. Supported Metacharacters
        2. 1.8.2. Pattern-Matching Functions
        3. 1.8.3. Examples
        4. 1.8.4. Other Resources
      9. 1.9. vi Editor
        1. 1.9.1. Supported Metacharacters
        2. 1.9.2. Pattern Matching
          1. Searching
          2. Substitution
        3. 1.9.3. Examples
        4. 1.9.4. Other Resources
      10. 1.10. JavaScript
        1. 1.10.1. Supported Metacharacters
        2. 1.10.2. Pattern-Matching Methods and Objects
          1. String
          2. RegExp
        3. 1.10.3. Examples
        4. 1.10.4. Other Resources
      11. 1.11. Shell Tools
        1. 1.11.1. Supported Metacharacters
          1. egrep
          2. sed
          3. awk
        2. 1.11.2. Other Resources
    3. Index
    4. About the Author
    5. SPECIAL OFFER: Upgrade this ebook with O’Reilly