Check if given name matches.

        Args:
            name (str): name to check.

        Returns:
            bool: matches name.
558336
def match(self, name):
        
        if self.method == Ex.Method.PREFIX:
            return name.startswith(self.value)
        elif self.method == Ex.Method.SUFFIX:
            return name.endswith(self.value)
        elif self.method == Ex.Method.CONTAINS:
            return self.value in name
        elif self.method == Ex.Method.EXACT:
            return self.value == name
        elif self.method == Ex.Method.REGEX:
            return re.search(self.value, name)
        return False
1033456
public void expectExactMatch(String name, String anotherName) {
        expectExactMatch(name, anotherName, messages.get(Validation.EXACT_MATCH_KEY.name(), name, anotherName));
    }
494399
static boolean isBadCase(String name)
    {
        EnumItem<NS> nrEnumItem = dictionary.get(name);
        if (nrEnumItem == null) return false;
        return nrEnumItem.containsLabel(NS.Z);
    }
1275272
static boolean isBadCase(String name)
    {
        EnumItem<NR> nrEnumItem = dictionary.get(name);
        if (nrEnumItem == null) return false;
        return nrEnumItem.containsLabel(NR.A);
    }
342942
def _namematcher(regex):
    """"""

    matcher = re_compile(regex)

    def match(target):
        target_name = getattr(target, '__name__', '')
        result = matcher.match(target_name)
        return result

    return match
1004973
def is_name_registered( self, name ):
        
        name_rec = self.get_name( name )    # won't return the name if expired
        if name_rec is None:
            return False 

        if name_rec['revoked']:
            return False

        return True
921456
def match(self, s):
      
      if self.re.match(s):
         self.list.append(s)
         return True
      else: return False
178318
def match(self, item):
        
        result = self._value == getattr(item, self._name)
        #log.debug("%r for %r = %r, name %r, item %r" % (
        #    result, getattr(item, self._name), self._value, self._name, item))
        return result
775479
protected static boolean isNameValid(String name) {
    Preconditions.checkNotNull(name);
    name = name.toLowerCase();
    return VALID_DB_TABLE_NAME_PATTERN_1.matcher(name).matches()
        && VALID_DB_TABLE_NAME_PATTERN_2.matcher(name).matches();
  }
1363756
def _filter_name(name):
    """"""
    # Remove if length 3 or less
    if len(name) <= 3:
        return False
    # Remove if starts with IL-
    if name.startswith('IL-'):
        return False
    lowname = name.lower()
    # Remove if contains certain sequences
    if any(c in lowname for c in STOP_SUB):
        return False
    # Remove if (case-insensitive) exact match to stoplist
    if lowname in STOPLIST:
        return False
    comps = re.split('[ -]', lowname)
    # Remove if just single character + digits separated by spaces or hyphens (or the word compound)
    if all(c.isdigit() or len(c) == 1 or c == 'compound' for c in comps):
        return False
    # Remove if 3 or fewer letters with 2 or fewer digits
    if len(comps) == 2 and len(comps[0]) <= 3 and comps[0].isalpha() and len(comps[1]) <= 3 and comps[1].isdigit():
        return False
    # Remove if just greek characters and numbrs
    if re.match('^[Α-Ωα-ω0-9]+$', name):
        return False
    # Filter registry numbers? No real size benefit in DAWG.
    # if REG_RE.search(name):
    #     keep = False
    # Handle this at the token level
    # if name.endswith(' derivative') or name.endswith(' analog') or name.endswith(' solution'):
    #     keep = False
    # Filter this after matching and expanding boundaries
    # if name.startswith('-') or name.endswith('-'):
    #     keep = False
    # Filter this after matching and expanding boundaries
    # if not bracket_level(name) == 0:
    #     print(name)
    return True
530377
def is_match(self, command):
        
        if command.output is None and self.requires_output:
            return False

        try:
            with logs.debug_time(u'Trying rule: {};'.format(self.name)):
                if self.match(command):
                    return True
        except Exception:
            logs.rule_failed(self, sys.exc_info())
178867
public static boolean isMemberName(String name)
  {
    if(name == null) {
      return false;
    }
    Matcher matcher = MEMBER_NAME_PATTERN.matcher(name);
    return matcher.find();
  }
360739
def has_index(self, name):
        
        name = self._normalize_identifier(name)

        return name in self._indexes
437807
def wildcards_overlap(name1, name2):
    """"""
    if not name1 and not name2:
        return True
    if not name1 or not name2:
        return False
    for matched1, matched2 in _character_matches(name1, name2):
        if wildcards_overlap(name1[matched1:], name2[matched2:]):
            return True
    return False
342542
def _check_subnet(self, name):
        
        # Subnets only exist in VPCs, so we don't need to worry about
        # the EC2 Classic case here.
        subnets = self._vpc_connection.get_all_subnets(
            filters={'vpcId': self._vpc_id})

        matching_subnets = [
            subnet
            for subnet
             in subnets
             if name in [subnet.tags.get('Name'), subnet.id]
        ]
        if len(matching_subnets) == 0:
            raise SubnetError(
                "the specified subnet %s does not exist" % name)
        elif len(matching_subnets) == 1:
            return matching_subnets[0].id
        else:
            raise SubnetError(
                "the specified subnet name %s matches more than "
                "one subnet" % name)
253950
def get_name(self, name):
        """"""
        if name not in self.get_names():
            raise exceptions.NameNotFoundError('name %s not found' % name)
        return self.get_names()[name]
1286357
def valid_name(name):
    ""
    if isinstance(name, bytes):
        name = name.decode('ascii')
    if not Definitions.COOKIE_NAME_RE.match(name):
        return False
    # This module doesn't support $identifiers, which are part of an obsolete
    # and highly complex standard which is never used.
    if name[0] == "$":
        return False
    return True