Go to the documentation of this file.
55 template<
class T>
class List;
67 mutable regex_t*
preg_;
80 template<
class StringType>
99 inline static bool meta(
char c)
104 || (
c ==
'*' ||
c ==
'+' ||
c ==
'?')
105 || (
c ==
'(' ||
c ==
')' ||
c ==
'|')
106 || (
c ==
'[' ||
c ==
']')
117 regExp(
const char*,
const bool ignoreCase=
false);
120 regExp(
const std::string&,
const bool ignoreCase=
false);
132 inline bool empty()
const
138 inline bool exists()
const
140 return preg_ ? true :
false;
154 void set(
const char*,
const bool ignoreCase=
false)
const;
158 void set(
const std::string&,
const bool ignoreCase=
false)
const;
173 bool match(
const std::string&)
const;
184 bool search(
const std::string& str)
const
186 return std::string::npos !=
find(str);
std::string::size_type find(const std::string &str) const
Find position within string.
bool matchGrouping(const std::string &, List< StringType > &groups) const
Return true if it matches and sets the sub-groups matched.
Wrapper around POSIX extended regular expressions.
void operator=(const regExp &)
Disallow default bitwise assignment.
bool clear() const
Release precompiled expression.
bool empty() const
Return true if a precompiled expression does not exist.
graph_traits< Graph >::vertices_size_type size_type
void set(const char *, const bool ignoreCase=false) const
Compile pattern into a regular expression,.
regex_t * preg_
Precompiled regular expression.
static bool meta(char c)
Is character a regular expression meta-character?
bool search(const std::string &str) const
Return true if the regex was found within string.
bool match(const std::string &) const
Return true if it matches the entire string.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const dimensionedScalar c
Speed of light in a vacuum.
int ngroups() const
Return the number of (groups)
bool exists() const
Does a precompiled expression exist?