Validate input_string against a regex pattern

        :return: True if match / False otherwise
494836
def validate(self, input_string):
        
        validation_result = False
        try:
            validation_result = bool(match(pattern=self.pattern, string=input_string))
        except TypeError as e:
            self.log.error(
                'Exception while validating Regex, pattern={}, input_string={} - exception: {}'.format(self.pattern,
                                                                                                       input_string,
                                                                                                       e))
        return validation_result
1217914
def is_match(self, match):
        
        result = False
        if self == match:
            result = True
        elif isinstance(match, str) and fnmatchcase(self.name, match):
            result = True  # Found by instance or name
        return result
506078
def match_main(self, text, pattern, loc):
    
    # Check for null inputs.
    if text == None or pattern == None:
      raise ValueError("Null inputs. (match_main)")

    loc = max(0, min(loc, len(text)))
    if text == pattern:
      # Shortcut (potentially not guaranteed by the algorithm)
      return 0
    elif not text:
      # Nothing to match.
      return -1
    elif text[loc:loc + len(pattern)] == pattern:
      # Perfect match at the perfect spot!  (Includes case of null pattern)
      return loc
    else:
      # Do a fuzzy compare.
      match = self.match_bitap(text, pattern, loc)
      return match
1173341
private boolean matchRegexp(String s, Pattern pattern) {
    final Matcher m = pattern.matcher(s);
    return m.matches();
  }
1258072
function matches(str, match) {
    if (Array.isArray(match)) {
        var l = match.length;
        for( var s=0; s < l; s++) {
            if ( mm(str,match[s])) {
                return true;
            }
        }
        return false;
    }
    return match.test(str);
}
1280047
def validate_wrap(self, value):
        '''  '''
        if not isinstance(value, basestring):
            self._fail_validation_type(value, basestring)
        if self.regex.match(value) is None:
            self._fail_validation(value, 'Value does not match regular expression')
132313
def ismatch(text, pattern):
    """"""

    if hasattr(pattern, 'search'):
        return pattern.search(text) is not None
    else:
        return pattern in text if Config.options.case_sensitive \
            else pattern.lower() in text.lower()
1235480
def is_valid(email):
        
        if isinstance(email, basestring) and EMAIL_RE.match(email):
            return True
        return False
163899
def matches(property_name, regex, *, present_optional=False, message=None):
    """"""
    def check(val):
      """Checks that a value matches a scope-enclosed regex."""
      if not val:
        return present_optional
      else:
        return True if regex.search(val) else False

    return Validation(check, property_name, message)
380316
function isMatchPresent(regex, text, test = false) {
  return test ? regex.test(text) : text.match(regex)
}
566042
def matches?(string, what)
      Regexp === what ? string.strip =~ what : string == what.to_s
    end
946798
def accepts(regex, negate, *values):
    
    return any(v and regex.search(v) for v in values) != negate
706295
protected boolean check(String value, String regex) {
		Pattern pattern = Pattern.compile(regex);
		return pattern.matcher(value).matches();
	}
96512
private function validateRegex(): bool
    {
        $isValid = \preg_match($this->options['pattern'], $this->value) ? true : false;
        if (!$isValid) {
            $this->setError(self::VALIDATOR_ERROR_REGEX_PATTERN_NOT_MATCH);
        }
        return $isValid;
    }
953330
def is_valid_regex(regex):
    """"""
    if len(regex) == 0:
        return False
    try:
        re.compile(regex)
        return True
    except sre_constants.error:
        return False
209076
def match_regex_list(patterns, string):
    """"""

    for p in patterns:

        if re.findall(p, string):
            return True

    return False
1152089
def regexp_filter(self_or_cls, pattern):
        
        def inner_filter(name, p):
            name_match = re.search(pattern,name)
            if name_match is not None:
                return True
            doc_match = re.search(pattern,p.doc)
            if doc_match is not None:
                return True
            return False
        return inner_filter