def get_group_value(self, token, match):
        """Return value of regex match for the specified group"""
        try:
            value = match.group('{}_{}'.format(token.name, self.group))
        except IndexError:
            value = ''
        return self.func(value) if callable(self.func) else value
def get_group_value ( self , token , match ) : try : value = match . group ( '{}_{}' . format ( token . name , self . group ) ) except IndexError : value = '' return self . func ( value ) if callable ( self . func ) else value
Return value of regex match for the specified group