| The Gaudi Framework v28r2p1 (f1a77ff4)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

Classes | Functions
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

  matchOr | return true if test is in any of the regexps
  matchAnd | return 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::string | test [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 //
82 return std::all_of( std::begin(regexps), std::end(regexps),
83 [&](typename T::const_reference i) {
84 return boost::regex_match(test, boost::regex{i});
85 });
86 }
GaudiTesting.BaseTest.regexps
regexps
Definition: BaseTest.py:858
std::end
T end(T...args)
std::begin
T begin(T...args)
std::all_of
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::string | test [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 //
64 return std::any_of( std::begin(regexps), std::end(regexps),
65 [&](typename T::const_reference i) {
66 return boost::regex_match(test, boost::regex{i});
67 });
68 }
GaudiTesting.BaseTest.regexps
regexps
Definition: BaseTest.py:858
std::end
T end(T...args)
std::begin
T begin(T...args)
std::any_of
T any_of(T...args)