Gaudi::Utils::RegEx Namespace Reference

RegeEx: nemspace to hold gaudi regular expression checking. More...

Classes

class  matchList
 

Functions

template<typename T >
bool matchOr (const std::string &test, const T &regexps)
 return true if the string is in any of the regex's More...
 
template<typename T >
bool matchAnd (const std::string &test, const T &regexps)
 return true if the string is in all of the regex's More...
 

Detailed Description

RegeEx: nemspace to hold gaudi regular expression checking.

Parameters
matchOrreturn true if test is in any of the regexps
matchAndreturn true if test is in all of the regexps
Author
Rob Lambert Rob.L.nosp@m.ambe.nosp@m.rt@ce.nosp@m.rn.c.nosp@m.h
Date
2009-07-29

Function Documentation

template<typename T >
bool Gaudi::Utils::RegEx::matchAnd ( const std::string test,
const T &  regexps 
)

return true if the string is in all of the regex's

Parameters
std::stringtest [IN]: string to match
container<std::string>regexps [IN]: container of regex strings can be any container with a const_iterator, begin and end

If you need to do this more than once, please first create a matchList object, and then invoke its And method.

Definition at line 78 of file RegEx.h.

79  {
80  //compares the string in test, to the regexps in a container
81  //
83  [&](typename T::const_reference i) {
84  return boost::regex_match(test, boost::regex{i});
85  });
86  }
T end(T...args)
T begin(T...args)
T all_of(T...args)
template<typename T >
bool Gaudi::Utils::RegEx::matchOr ( const std::string test,
const T &  regexps 
)

return true if the string is in any of the regex's

Parameters
std::stringtest [IN]: string to match
container<std::string>regexps [IN]: container of regex strings can be any container with a const_iterator, begin and end

If you need to do this more than once, please first create a matchList object, and then invoke its Or method.

Definition at line 60 of file RegEx.h.

61  {
62  //compares the string in test, to the regexps in a container
63  //
65  [&](typename T::const_reference i) {
66  return boost::regex_match(test, boost::regex{i});
67  });
68  }
T end(T...args)
T begin(T...args)
T any_of(T...args)