| The Gaudi Framework v29r1 (5cd95fa2)

- 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 79 of file RegEx.h.

80 {
81 // compares the string in test, to the regexps in a container
82 //
83 return std::all_of( std::begin( regexps ), std::end( regexps ), [&]( typename T::const_reference i ) {
84 return boost::regex_match( test, boost::regex{i} );
85 } );
86 }
GaudiTesting.BaseTest.regexps
regexps
Definition: BaseTest.py:932
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 61 of file RegEx.h.

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