24.14 Regular Expressions with the regex Library
Regular expressions are specially formatted
strings that are used to find patterns in text. They can be used to validate data to ensure that it is in a particular format. For example, a zip code must consist of five digits, and a last name must start with a capital letter.
regex library (from header
<regex>) provides several classes and algorithms for recognizing and manipulating regular expressions. Class template basic_regex represents a regular expression. The algorithm regex_match returns true if a
string matches the regular expression. With
regex_match, the entire string must match the ...