def __init__(self, json=None, pattern=None, **kwargs):
        """Construct an regex string validator effect.

        If no pattern is provided than the regexstring `'.+'` will be used, which matches all provided text with
        at least a single character. Does not match `''` (empty string).

        :param json: (optional) dict (json) object to construct the object from
        :type json: dict
        :param pattern: (optional) valid regex string, defaults to r'.+' which matches all text.
        :type text: basestring
        :param kwargs: (optional) additional kwargs to pass down
        :type kwargs: dict
        """
        super(RegexStringValidator, self).__init__(json=json, **kwargs)

        if pattern is not None:
            self._config['pattern'] = pattern

        self.pattern = self._config.get('pattern', r'.+')
        self._re = re.compile(self.pattern)
def __init__ ( self , json = None , pattern = None , ** kwargs ) : super ( RegexStringValidator , self ) . __init__ ( json = json , ** kwargs ) if pattern is not None : self . _config [ 'pattern' ] = pattern self . pattern = self . _config . get ( 'pattern' , r'.+' ) self . _re = re . compile ( self . pattern )
Construct an regex string validator effect.

        If no pattern is provided than the regexstring `'.+'` will be used, which matches all provided text with
        at least a single character. Does not match `''` (empty string).

        :param json: (optional) dict (json) object to construct the object from
        :type json: dict
        :param pattern: (optional) valid regex string, defaults to r'.+' which matches all text.
        :type text: basestring
        :param kwargs: (optional) additional kwargs to pass down
        :type kwargs: dict