|
Gaudi Framework, version v21r6 |
| Home | Generated: 11 Nov 2009 |
| matchOr,: | return true if test is in any of the regexps | |
| matchAnd,: | return true if test is in all of the regexps |
Functions | |
| template<typename T> | |
| bool | matchOr (const std::string &test, const T ®exps) |
| return true if the string is in any of the regex's | |
| template<typename T> | |
| bool | matchAnd (const std::string &test, const T ®exps) |
| return true if the string is in all of the regex's | |
| bool Gaudi::Utils::RegEx::matchAnd | ( | const std::string & | test, | |
| const T & | regexps | |||
| ) | [inline] |
return true if the string is in all of the regex's
| 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 |
Definition at line 49 of file RegEx.h.
00050 { 00051 //compares the string in test, to the regexps in a container 00052 for (typename T::const_iterator i = regexps.begin(); 00053 i != regexps.end(); ++i) 00054 { 00055 const boost::regex pattern(*i); 00056 if (!boost::regex_match(test, pattern)) return false; 00057 } 00058 return true; 00059 }
| bool Gaudi::Utils::RegEx::matchOr | ( | const std::string & | test, | |
| const T & | regexps | |||
| ) | [inline] |
return true if the string is in any of the regex's
| 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 |
Definition at line 32 of file RegEx.h.
00033 { 00034 //compares the string in test, to the regexps in a container 00035 for (typename T::const_iterator i = regexps.begin(); 00036 i != regexps.end(); ++i) 00037 { 00038 const boost::regex pattern(*i); 00039 if (boost::regex_match(test, pattern)) return true; 00040 } 00041 return false; 00042 }