Chapter 16. Regular Expression Objects
I du believe with all my soulIn the gret Press’s freedom,To pint the people to the goalAn’ in the traces lead ’em.
— “The Bigelow Papers”JAMES RUSSELL LOWELL
All the operations that involve regular expressions begin with an object of a type that is an instantiation of the class template basic_regex
. This object holds the regular expression to be matched. It’s passed as an argument to the search functions (Chapter 17) and to the constructors of the regular expression iterators (Chapter 19).
The template takes two type arguments. The first, referred to as Elem
in this chapter, is the type of the characters that the regular expression object will traffic in. The most common element types are, of course, char ...
Get The C++ Standard Library Extensions A Tutorial and Reference 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.