Lesson 2. Matching Single Characters
In this lesson you’ll learn how to perform simple character matches of one or more characters.
Matching Literal Text
Ben
is a regular expression. Because it is plain text, it may not look like a regular expression, but it is. Regular expressions can contain plain text (and may even contain only plain text). Admittedly, this is a total waste of regular expression processing, but it’s a good place to start.
So, here goes:
Hello, my name is Ben. Please visitmy website at http://www.forta.com/.
Ben
Hello, my name is ...
Get Sams Teach Yourself Regular Expressions in 10 Minutes now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.