def __init__(self, regex, function=None):
matcher_base_t.__init__(self)<EOL>self.regex = re.compile(regex)<EOL>self.function = function<EOL>if self.function is None:<EOL><INDENT>self.function = lambda decl: decl.name<EOL><DEDENT>
:param regex: regular expression
:type regex: string, an instance of this class will compile it for you

:param function: function that will be called to get an information
                 from declaration as string. As input this function
                 takes single argument - reference to a declaration.
                 Return value should be string. If function is None,
                 then the matcher will use declaration name.