Publisher: O'Reilly Media
Final Release Date: July 2012
Pages: 154
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
|
-
Chapter 1 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 1 -
Technical Notes -
Chapter 2 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 -
What You Learned in Chapter 2 -
Technical Notes -
Chapter 3 Boundaries -
The Beginning and End of a Line -
Word and Non-word Boundaries -
Other Anchors -
Quoting a Group of Characters as Literals -
Adding Tags -
What You Learned in Chapter 3 -
Technical Notes -
Chapter 4 Alternation, Groups, and Backreferences -
Alternation -
Subpatterns -
Capturing Groups and Backreferences -
Non-Capturing Groups -
What You Learned in Chapter 4 -
Technical Notes -
Chapter 5 Character Classes -
Negated Character Classes -
Union and Difference -
POSIX Character Classes -
What You Learned in Chapter 5 -
Technical Notes -
Chapter 6 Matching Unicode and Other Characters -
Matching a Unicode Character -
Matching Characters with Octal Numbers -
Matching Unicode Character Properties -
Matching Control Characters -
What You Learned in Chapter 6 -
Technical Notes -
Chapter 7 Quantifiers -
Greedy, Lazy, and Possessive -
Matching with *, +, and ? -
Matching a Specific Number of Times -
Lazy Quantifiers -
Possessive Quantifiers -
What You Learned in Chapter 7 -
Technical Notes -
Chapter 8 Lookarounds -
Positive Lookaheads -
Negative Lookaheads -
Positive Lookbehinds -
Negative Lookbehinds -
What You Learned in Chapter 8 -
Technical Notes -
Chapter 9 Marking Up a Document with HTML -
Matching Tags -
Transforming Plain Text with sed -
Appending Tags -
Transforming Plain Text with Perl -
What You Learned in Chapter 9 -
Technical Notes -
Chapter 10 The End of the Beginning -
Learning More -
Notable Tools, Implementations, and Libraries -
Matching a North American Phone Number -
Matching an Email Address -
What You Learned in Chapter 10 -
Appendix Regular Expression Reference -
Regular Expressions in QED -
Metacharacters -
Character Shorthands -
Whitespace -
Unicode Whitespace Characters -
Control Characters -
Character Properties -
Script Names for Character Properties -
POSIX Character Classes -
Options/Modifiers -
ASCII Code Chart with Regex -
Technical Notes -
Regular Expression Glossary -
Colophon |
- Title:
- Introducing Regular Expressions
- By:
- Michael Fitzgerald
- Publisher:
- O'Reilly Media
- Formats:
-
- Print
- Ebook
- Safari Books Online
- Print:
- July 2012
- Ebook:
- July 2012
- Pages:
- 154
- Print ISBN:
- 978-1-4493-9268-0
- | ISBN 10:
- 1-4493-9268-7
- Ebook ISBN:
- 978-1-4493-1667-9
- | ISBN 10:
- 1-4493-1667-0
|
-
Michael Fitzgerald Michael Fitzgerald describes Ruby as "my favorite language so far" and is working regularly with Ruby and the Rails framework. He has written over 150 Ruby programs for testing and demonstration, and has been developing a library of sample Ruby code. He is the author of Learning XSLT and XML Hacks, and co-author on the XML Pocket Reference. View Michael Fitzgerald's full profile page. |
Colophon Members of the suborder Megachiroptera and family Pteropodidae are known as fruit bats, flying foxes, old world fruit bats, or megabats. Despite the latter nickname, members of the Pteropodidae family vary greatly in size—the smallest measure six centimeters, while others weigh in at two pounds, with wingspans up to approximately five feet long.True to their name, fruit bats are frugivorous, or nectavorious, meaning they eat fruit or lick nectar from flowers. Some use their teeth to bite through fruit skin and actually eat the fruit, while others lick juices from crushed fruit. Because many of them dine on flower nectar, fruit bats are excellent pollinators and seed-spreaders—in fact, the World Bat Sanctuary estimates that approximately 95% of all new rainforest growth can be attributed to fruit bats’ distribution of seeds. This relationship between the bats and plants is a form of mutualism—the way organisms of different species interact biologically for a mutual fitness benefit—known as chiropterophily.Fruit bats can be found all over the world, though they prefer warm, tropical climates, due in part to the availability of fruit and flowers. While they’re excellent flyers, fruit bats are known for their clumsy landings; they often crash land into trees or try to grab limbs with their feet in order to stop themselves. This perpetuates the misconception that they’re blind, when in fact, fruit bats are said to have the best vision of all the bat species, most of which rely on echolocation to get around. Fruit bats use vision—along with their advanced senses of smell—to locate food and navigate. |
|
Table of Contents
|
Product Details
|
About the Author
|
Colophon
|
 |
|
 |
|
|
|
Recommended for You
|
 |
|
|
|
Customer Reviews

12/11/2012 (3 of 3 customers found this review helpful) 5.0Better than Mastering Regular Expression By rogerx from North Pole, Alaska About Me Developer, Sys Admin - Accurate
- Concise
- Easy to understand
- Helpful examples
- Well-written
- Expert
- For Everything
- Intermediate
- Novice
- Student
9/8/2012 (2 of 2 customers found this review helpful) 4.0The best intro into regular expressions By Zoltan Varju from Szikszo, Hungary About Me Computational linguist - Accurate
- Concise
- Easy to understand
- Helpful examples
- Well-written
9/6/2012 (2 of 2 customers found this review helpful) 4.0Grab it, read it, learn it - Accurate
- Easy to understand
- Helpful examples
9/5/2012 4.0Nice introductory book By Germán from Buenos Aires, Argentina - Accurate
- Easy to understand
- Well-written
8/26/2012 (2 of 2 customers found this review helpful) 4.0Satisfied with the content of the book - Accurate
- Concise
- Easy to understand
- Helpful examples
- Well-written
- Intermediate
- Novice
- Student
8/2/2012 (2 of 2 customers found this review helpful) 4.0Delivers what it promises By teak from Jyväskylä, Finland - Easy to understand
- Helpful examples
7/27/2012 (1 of 1 customers found this review helpful) By datopdog from Johannesburg, RSA About Me Developer, Sys Admin - Easy to understand
- Helpful examples
- Well-written
- Some basic grammer errors
|
|
|