O'Reilly logo

The C++ Programming Language, Fourth Edition by Bjarne Stroustrup

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

37. Regular Expressions

If the code and the comments disagree, then both are probably wrong.

– Norm Schryer

Regular Expressions

Regular Expression Notation

regex

Match Results; Formatting

Regular Expression Functions

regex_match(); regex_search(); regex_replace()

Regular Expression Iterators

regex_iterator; regex_token_iterator

regex_traits

Advice

37.1. Regular Expressions

In <regex>, the standard library provides support for regular expressions:

regex_match(): Match a regular expression against a string (of known size).

regex_search(): Search for a string that matches a regular expression in an (arbitrarily long) stream of data.

regex_replace(): Search for strings that match a regular expression in an (arbitrarily long) stream ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required