Introducing Regular Expressions

Front Cover
"O'Reilly Media, Inc.", Jul 24, 2012 - Computers - 136 pages

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 people are saying - Write a review

We haven't found any reviews in the usual places.

Contents

Chapter 1 What Is a Regular Expression?
1
Chapter 2 Simple Pattern Matching
13
Chapter 3 Boundaries
31
Chapter 4 Alternation Groups and Backreferences
43
Chapter 5 Character Classes
55
Chapter 6 Matching Unicode and Other Characters
63
Chapter 7 Quantifiers
75
Chapter 8 Lookarounds
83
Chapter 9 Marking Up a Document with HTML
89
Chapter 10 The End of the Beginning
103
Appendix A Regular Expression Reference
111
Regular Expression Glossary
125
Index
131
About the Author
139
Copyright

Other editions - View all

Common terms and phrases

About the author (2012)

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.

Bibliographic information