Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
RecoLuminosity
LumiDB
python
RegexValidator.py
Go to the documentation of this file.
1
import
re
2
class
RegexValidator
(
object
):
3
def
__init__
(self, pattern, statement=None):
4
self.
pattern
= re.compile(pattern)
5
self.
statement
= statement
6
if
not
self.
statement
:
7
self.
statement
=
"must match pattern %s"
% self.
pattern
8
9
def
__call__
(self, string):
10
match = self.pattern.search(string)
11
if
not
match:
12
raise
ValueError(self.
statement
)
13
return
string
14
RegexValidator.RegexValidator.__call__
def __call__
Definition:
RegexValidator.py:9
RegexValidator.RegexValidator.statement
statement
Definition:
RegexValidator.py:5
RegexValidator.RegexValidator
Definition:
RegexValidator.py:2
RegexValidator.RegexValidator.pattern
pattern
Definition:
RegexValidator.py:4
dbtoconf.object
list object
Definition:
dbtoconf.py:77
RegexValidator.RegexValidator.__init__
def __init__
Definition:
RegexValidator.py:3
Generated for CMSSW Reference Manual by
1.8.5