Book description
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
Table of contents
- Introducing Regular Expressions
- SPECIAL OFFER: Upgrade this ebook with O’Reilly
- Preface
-
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
- 2. Simple Pattern Matching
- 3. Boundaries
- 4. Alternation, Groups, and Backreferences
- 5. Character Classes
- 6. Matching Unicode and Other Characters
- 7. Quantifiers
- 8. Lookarounds
- 9. Marking Up a Document with HTML
- 10. The End of the Beginning
- A. Regular Expression Reference
- Regular Expression Glossary
- Index
- About the Author
- Colophon
- SPECIAL OFFER: Upgrade this ebook with O’Reilly
- Copyright
Product information
- Title: Introducing Regular Expressions
- Author(s):
- Release date: July 2012
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781449392680
You might also like
book
Networking Fundamentals
Become well-versed with basic networking concepts such as routing, switching, and subnetting, and prepare for the …
audiobook
Fall in Love with the Problem, Not the Solution
Unicorns-companies that reach a valuation of more than $1 billion-are rare. Uri Levine has built two. …
audiobook
The Design of Everyday Things
First, businesses discovered quality as a key competitive edge; next came science. Now, Donald A. Norman, …
book
The GuruBook
The GuruBook is an inspiring collection of 45 articles and interviews with well-known thought leaders and …