|
| regex_compiler (RegexTraits const &traits=RegexTraits()) |
|
locale_type | imbue (locale_type loc) |
| Specify the locale to be used by a regex_compiler. More...
|
|
locale_type | getloc () const |
| Get the locale used by a regex_compiler. More...
|
|
template<typename InputIter > |
basic_regex< BidiIter > | compile (InputIter begin, InputIter end, flag_type flags=regex_constants::ECMAScript) |
| Builds a basic_regex object from a range of characters. More...
|
|
template<typename InputRange > |
disable_if< is_pointer
< InputRange >, basic_regex
< BidiIter > >::type | compile (InputRange const &pat, flag_type flags=regex_constants::ECMAScript) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
|
|
basic_regex< BidiIter > | compile (char_type const *begin, flag_type flags=regex_constants::ECMAScript) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
|
|
basic_regex< BidiIter > | compile (char_type const *begin, std::size_t size, flag_type flags) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
|
|
basic_regex< BidiIter > & | operator[] (string_type const &name) |
| Return a reference to the named regular expression. More...
|
|
basic_regex< BidiIter > const & | operator[] (string_type const &name) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
|
|
template<typename BidiIter, typename RegexTraits, typename CompilerTraits>
struct boost::xpressive::regex_compiler< BidiIter, RegexTraits, CompilerTraits >
Class template regex_compiler is a factory for building basic_regex objects from a string.
Class template regex_compiler is used to construct a basic_regex object from a string. The string should contain a valid regular expression. You can imbue a regex_compiler object with a locale, after which all basic_regex objects created with that regex_compiler object will use that locale. After creating a regex_compiler object, and optionally imbueing it with a locale, you can call the compile() method to construct a basic_regex object, passing it the string representing the regular expression. You can call compile() multiple times on the same regex_compiler object. Two basic_regex objects compiled from the same string will have different regex_id's.
template<typename BidiIter , typename RegexTraits , typename CompilerTraits >
template<typename InputIter >
Builds a basic_regex object from a range of characters.
- Parameters
-
begin | The beginning of a range of characters representing the regular expression to compile. |
end | The end of a range of characters representing the regular expression to compile. |
flags | Optional bitmask that determines how the pat string is interpreted. (See syntax_option_type.) |
- Returns
- A basic_regex object corresponding to the regular expression represented by the character range.
- Precondition
- InputIter is a model of the InputIterator concept.
-
[begin,end) is a valid range.
-
The range of characters specified by [begin,end) contains a valid string-based representation of a regular expression.
- Exceptions
-
regex_error | when the range of characters has invalid regular expression syntax. |
References boost::detail::type.
Referenced by boost::xpressive::regex_compiler< BidiIter, RegexTraits, CompilerTraits >::compile().
template<typename BidiIter , typename RegexTraits , typename CompilerTraits >
Return a reference to the named regular expression.
If no such named regular expression exists, create a new regular expression and return a reference to it.
- Parameters
-
name | A std::string containing the name of the regular expression. |
- Precondition
- The string is not empty.
- Exceptions
-
bad_alloc | on allocation failure. |
References BOOST_ASSERT, and boost::iostreams::gzip::flags::name.