'Initialized regex validator.
Raises:
AttributeDefinitionError: if string_type is not a kind of string.'

def __init__(self, string_type=unicode, default=None):

    if (default is not None):
        default = _RegexStrValue(self, default, None)
        re.compile(str(default))
    super(RegexStr, self).__init__(default)
    if ((not issubclass(string_type, basestring)) or (string_type is basestring)):
        raise AttributeDefinitionError(('RegexStr    fields    must    be    a    string    type    not    %s.' % str(string_type)))
    self.expected_type = string_type
