Sign up
Forgot password?
FAQ: Login

Fitzgerald Michael. Introducing Regular Expressions

  • zip file
  • size 5,22 MB
  • contains azw document(s)
Fitzgerald Michael. Introducing Regular Expressions
O’Reilly Media, 2012. — 152 p. — ISBN: 978-1-449-39268-0.
If you’re a programmer new to regular expressions, this easy-to-follow guide is a great place to start. You’ll learn the fundamentals step-by-step with the help of numerous examples, discovering first-hand how to match, extract, and transform text by matching specific words, characters, and patterns.
Regular expressions are an essential part of a programmer’s toolkit, available in various Unix utlilities as well as programming languages such as Perl, Java, JavaScript, and C#. When you’ve finished this book, you’ll be familiar with the most commonly used syntax in regular expressions, and you’ll understand how using them will save you considerable time.
* Discover what regular expressions are and how they work
* Learn many of the differences between regular expressions used with command-line tools and in various programming languages
* Apply simple methods for finding patterns in text, including digits, letters, Unicode characters, and string literals
* Learn how to use zero-width assertions and lookarounds
* Work with groups, backreferences, character classes, and quantifiers
* Use regular expressions to mark up plain text with HTML5
What Is a Regular Expression
Getting Started with Regexpal
Matching a North American Phone Number
Matching Digits with a Character Class
Using a Character Shorthand
Matching Any Character
Capturing Groups and Back References
Using Quantifiers
Quoting Literals
A Sample of Applications
What You Learned in Chapter
Technical Notes
Simple Pattern Matching
Matching String Literals
Matching Digits
Matching Non-Digits
Matching Word and Non-Word Characters
Matching Whitespace
Matching Any Character, Once Again
Marking Up the Text
Using sed to Mark Up Text
Using Perl to Mark Up Text
What You Learned in Chapter
Technical Notes
Boundaries
The Beginning and End of a Line
Word and Non-word Boundaries
Other Anchors
Quoting a Group of Characters as Literals
Adding Tags
Adding Tags with sed
Adding Tags with Perl
What You Learned in Chapter
Technical Notes
Alternation, Groups, and Backreferences
Alternation
Subpatterns
Capturing Groups and Backreferences
Named Groups
Non-Capturing Groups
Atomic Groups
What You Learned in Chapter
Technical Notes
Character Classes
Negated Character Classes
Union and Difference
POSIX Character Classes
What You Learned in Chapter
Technical Notes
Matching Unicode and Other Characters
Matching a Unicode Character
Using vim
Matching Characters with Octal Numbers
Matching Unicode Character Properties
Matching Control Characters
What You Learned in Chapter
Technical Notes
Quantifiers
Greedy, Lazy, and Possessive
Matching with *, +, and
Matching a Specific Number of Times
Lazy Quantifiers
Possessive Quantifiers
What You Learned in Chapter
Technical Notes
Lookarounds
Positive Lookaheads
Negative Lookaheads
Positive Lookbehinds
Negative Lookbehinds
What You Learned in Chapter
Technical Notes
Marking Up a Document with HTML
Matching Tags
Transforming Plain Text with sed
Substitution with sed
Handling Roman Numerals with sed
Handling a Specific Paragraph with sed
Handling the Lines of the Poem with sed
Appending Tags
Using a Command File with sed
Transforming Plain Text with Perl
Handling Roman Numerals with Perl
Handling a Specific Paragraph with Perl
Handling the Lines of the Poem with Perl
Using a File of Commands with Perl
What You Learned in Chapter
Technical Notes
The End of the Beginning
Learning More
Notable Tools, Implementations, and Libraries
Perl
PCRE
Ruby (Oniguruma)
Python
RE
Matching a North American Phone Number
Matching an Email Address
What You Learned in Chapter
Appendix: Regular Expression Reference
Regular Expression Glossary
  • Sign up or login using form at top of the page to download this file.
  • Sign up
Up