![]() |
Home | Libraries | People | FAQ | More |
boost::xpressive::basic_regex — Class template basic_regex<> is a class for holding a compiled regular expression.
// In header: <boost/xpressive/basic_regex.hpp> template<typename BidiIter> struct basic_regex { // types typedef ; typedef ; typedef ; typedef ; typedef ; // construct/copy/destruct (); (basic_regex< ); template<typename Expr> (); basic_regex< (basic_regex< ); template<typename Expr> basic_regex< (); // public member functions () ; () ; (basic_regex< ); // public static functions template<typename InputIter> basic_regex< (, , = ); template<typename InputRange> basic_regex< (, = ); basic_regex< (, = ); basic_regex< (, , ); // public data members static ECMAScript; static icase; static nosubs; static optimize; static collate; static single_line; static not_dot_null; static not_dot_newline; static ignore_white_space; };
basic_regex
public
construct/copy/destruct();
Postconditions: |
regex_id() == 0 |
Postconditions: |
mark_count() == 0 |
(basic_regex< that);
Parameters: |
|
||
Postconditions: |
regex_id() == that.regex_id() |
||
Postconditions: |
mark_count() == that.mark_count() |
template<typename Expr> ( expr);
Construct from a static regular expression.
Parameters: |
|
||
Requires: |
Expr is the type of a static regular expression. |
||
Postconditions: |
regex_id() != 0 |
||
Postconditions: |
mark_count() >= 0 |
basic_regex< (basic_regex< that);
Parameters: |
|
||
Postconditions: |
regex_id() == that.regex_id() |
||
Postconditions: |
mark_count() == that.mark_count() |
||
Returns: |
*this |
template<typename Expr> basic_regex< ( expr);
Construct from a static regular expression.
Parameters: |
|
||
Requires: |
Expr is the type of a static regular expression. |
||
Postconditions: |
regex_id() != 0 |
||
Postconditions: |
mark_count() >= 0 |
||
Returns: |
*this |
||
Throws: |
std::bad_alloc on out of memory |
basic_regex
public member functions() ;
Returns the count of capturing sub-expressions in this regular expression
() ;
Returns a token which uniquely identifies this regular expression.
(basic_regex< that);
Swaps the contents of this basic_regex
object with another.
![]() |
Note |
---|---|
This is a shallow swap that does not do reference tracking. If you embed a |
Parameters: |
|
||
Throws: |
Will not throw. |
basic_regex
public static functionstemplate<typename InputIter> basic_regex< ( begin, end, flags = );
Factory method for building a regex object from a range of characters. Equivalent to regex_compiler
< BidiIter >().compile(begin, end, flags);
Parameters: |
|
||||||
Requires: |
[begin,end) is a valid range. |
||||||
Requires: |
The range of characters specified by [begin,end) contains a valid string-based representation of a regular expression. |
||||||
Returns: |
A basic_regex object corresponding to the regular expression represented by the character range. |
||||||
Throws: |
regex_error when the range of characters has invalid regular expression syntax. |
template<typename InputRange> basic_regex< ( pat, flags = );
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
basic_regex< ( begin, flags = );
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
basic_regex< ( begin, len, flags);
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.