Chapter 24. Regular Expressions

 

Art is the imposing of a pattern on experience, and our aesthetic enjoyment is recognition of the pattern.

 
 --Alfred North Whitehead
 

You ought to be able to show that you can do it a good deal better than anyone else with the regular tools before you have a license to bring in your own improvements.

 
 --Ernest Hemmingway
 

Matchmaker, Matchmaker look through your book, and make me a perfect match.

 
 --Sheldon Harnick, Fiddler on the Roof

OBJECTIVES

In this chapter you will learn:

  • What regular expressions are and when they are useful.

  • To use regular expressions in conjunction with classes Regex and Match.

  • To iterate over matches to a regular expression.

  • To use character classes to match any character from a set of characters. ...

Get Visual C++ 2008: How to Program, Second Edition 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.