| title |
<regex> | Microsoft Docs |
| ms.custom |
|
| ms.date |
11/04/2016 |
| ms.reviewer |
|
| ms.suite |
|
| ms.technology |
|
| ms.tgt_pltfrm |
|
| ms.topic |
article |
| f1_keywords |
|
| dev_langs |
|
| helpviewer_keywords |
|
| ms.assetid |
5dd4ef74-6063-4dbc-b692-1960bb736f0b |
| caps.latest.revision |
23 |
| author |
corob-msft |
| ms.author |
corob |
| manager |
ghogen |
| translation.priority.ht |
cs-cz |
de-de |
es-es |
fr-fr |
it-it |
ja-jp |
ko-kr |
pl-pl |
pt-br |
ru-ru |
tr-tr |
zh-cn |
zh-tw |
|
Defines a template class to parse Regular Expressions (C++), and several template classes and functions to search text for matches to a regular expression object.
Remarks
To create a regular expression object, use the template class basic_regex Class or one of its specializations, regex and wregex, together with the syntax flags of type regex_constants::syntax_option_type.
To search text for matches to a regular expression object, use the template functions regex_match and regex_search, together with the match flags of type regex_constants::match_flag_type. These functions return results by using the template class match_results Class and its specializations, cmatch, wcmatch, smatch, and wsmatch, together with the template class sub_match Class and its specializations, csub_match, wcsub_match, ssub_match, and wssub_match.
To replace text that matches a regular expression object, use the template function regex_replace, together with the match flags of type regex_constants::match_flag_type.
To iterate through multiple matches of a regular expression object, use the template classes regex_iterator Class and regex_token_iterator Class or one of their specializations, cregex_iterator, sregex_iterator, wcregex_iterator, wsregex_iterator, cregex_token_iterator, sregex_token_iterator, wcregex_token_iterator, or wsregex_token_iterator, together with the match flags of type regex_constants::match_flag_type.
To modify the details of the grammar of regular expressions, write a class that implements the regular expression traits.
|
|
| regex_match |
Exactly matches a regular expression. |
| regex_replace |
Replaces matched regular expressions. |
| regex_search |
Searches for a regular expression match. |
| swap |
Swaps basic_regex or match_results objects. |
|
|
| operator== |
Comparison of various objects, equal. |
| operator!= |
Comparison of various objects, not equal. |
| operator< |
Comparison of various objects, less than. |
| operator<= |
Comparison of various objects, less than or equal. |
| operator> |
Comparison of various objects, greater than. |
| operator>= |
Comparison of various objects, greater than or equal. |
| operator<< |
Inserts a sub_match in a stream. |
Regular Expressions (C++)
regex_constants Class
regex_error Class
<regex> functions
regex_iterator Class
<regex> operators
regex_token_iterator Class
regex_traits Class
<regex> typedefs