GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::basic_regex(3) C++ Standard Libary std::basic_regex(3)

std::basic_regex - std::basic_regex


Defined in header <regex>
template <


class CharT, (since C++11)
class Traits = std::regex_traits<CharT>


> class basic_regex;


The class template basic_regex provides a general framework for holding regular
expressions.


Several specializations for common character types are provided:


Defined in header <regex>
Type Definition
regex basic_regex<char>
wregex basic_regex<wchar_t>


Member type Definition
value_type CharT
traits_type Traits
string_type Traits::string_type
locale_type Traits::locale_type
flag_type std::regex_constants::syntax_option_type


Value Effect(s)
icase Character matching should be performed without regard to case.
When performing matches, all marked sub-expressions (expr) are
nosubs treated as non-marking sub-expressions (?:expr). No matches are
stored in the supplied std::regex_match structure and mark_count()
is zero.
Instructs the regular expression engine to make matching faster,
optimize with the potential cost of making construction slower. For
example, this might mean converting a non-deterministic FSA to a
deterministic FSA.
collate Character ranges of the form "[a-b]" will be locale sensitive.
multiline (C++17) Specifies that ^ shall match the beginning of a line and $ shall
match the end of a line, if the ECMAScript engine is selected.
ECMAScript Use the Modified ECMAScript regular expression grammar.
basic Use the basic POSIX regular expression grammar (grammar
documentation).
extended Use the extended POSIX regular expression grammar (grammar
documentation).
awk Use the regular expression grammar used by the awk utility in
POSIX (grammar documentation).
Use the regular expression grammar used by the grep utility in
grep POSIX. This is effectively the same as the basic option with the
addition of newline '\n' as an alternation separator.
Use the regular expression grammar used by the grep utility, with
egrep the -E option, in POSIX. This is effectively the same as the
extended option with the addition of newline '\n' as an
alternation separator in addition to '|'.


At most one grammar option must be chosen out of ECMAScript, basic, extended, awk,
grep, egrep. If no grammar is chosen, ECMAScript is assumed to be selected. The
other options serve as modifiers, such that std::regex("meow", std::regex::icase) is
equivalent to std::regex("meow", std::regex::ECMAScript|std::regex::icase).


constructor constructs the regex object
(public member function)
destructor destructs the regex object
(public member function)
operator= assigns the contents
(public member function)
assign assigns the contents
(public member function)


returns the number of marked sub-expressions within the regular
mark_count expression
(public member function)
flags returns the syntax flags
(public member function)


getloc get locale information
(public member function)
imbue set locale information
(public member function)


swap swaps the contents
(public member function)


The member constants in basic_regex are duplicates of the syntax_option_type
constants defined in the namespace std::regex_constants.


std::swap(std::basic_regex) specializes the std::swap algorithm
(C++11) (function template)


Deduction guides(since C++17)

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.