avoid "..." etc. to be matched:
341947
private boolean isWord(String token) {
    boolean isWord = true;
    if (StringUtils.isNumericSpace(token)) {
      isWord = false;
    } else if (token.length() == 1) {
      char c = token.charAt(0);
      if (!Character.isLetter(c)) {
        isWord = false;
      }
    }
    return isWord;
  }
201733
function validateString(node, match) {
            const isTemplateElement = node.type === "TemplateElement";
            const escapedChar = match[0][1];
            let isUnnecessaryEscape = !VALID_STRING_ESCAPES.has(escapedChar);
            let isQuoteEscape;

            if (isTemplateElement) {
                isQuoteEscape = escapedChar === "`";

                if (escapedChar === "$") {

                    // Warn if `\$` is not followed by `{`
                    isUnnecessaryEscape = match.input[match.index + 2] !== "{";
                } else if (escapedChar === "{") {

                    /*
                     * Warn if `\{` is not preceded by `$`. If preceded by `$`, escaping
                     * is necessary and the rule should not warn. If preceded by `/$`, the rule
                     * will warn for the `/$` instead, as it is the first unnecessarily escaped character.
                     */
                    isUnnecessaryEscape = match.input[match.index - 1] !== "$";
                }
            } else {
                isQuoteEscape = escapedChar === node.raw[0];
            }

            if (isUnnecessaryEscape && !isQuoteEscape) {
                report(node, match.index + 1, match[0].slice(1));
            }
        }
284725
def content_match?(content)
      if pattern.is_a?(String)
        content.any? { |thing| thing == pattern }
      else
        content.any? { |thing| thing =~ pattern }
      end
    end
350046
def match_regexp(self, value, q, strict=False):
        """"""
        value = stringify(value)
        mr = re.compile(q)
        if value is not None:
            if mr.match(value):
                return
        self.shout('%r not matching the regexp %r', strict, value, q)
1093802
def clean_pred(self, pred, ignore_warning=False):
        ''' 
        '''
        original_pred = pred
        pred = pred.lower().strip()
        if 'http' in pred:
            pred = pred.split('/')[-1]
        elif ':' in pred:
            if pred[-1] != ':': # some matches are "prefix:" only
                pred = pred.split(':')[-1]
        else:
            if not ignore_warning:
                exit('Not a valid predicate: ' + original_pred + '. Needs to be an iri "/" or curie ":".')
        return pred
392771
def nocatch(regex):
    
    if is_solid(regex) and not is_packed(regex):
        return regex
    else:
        return '(?:{})'.format(danger_unpack(regex))
1347149
function matchImmediate(el, match) {
        var matched = 1, startEl = el, relativeOp, startMatch = match;
        do {
            matched &= singleMatch(el, match);
            if (matched) {
                // advance
                match = match && match.prev;
                if (!match) {
                    return true;
                }
                relativeOp = relativeExpr[match.nextCombinator];
                el = dir(el, relativeOp.dir);
                if (!relativeOp.immediate) {
                    return {
                        // advance for non-immediate
                        el: el,
                        match: match
                    };
                }
            } else {
                relativeOp = relativeExpr[match.nextCombinator];
                if (relativeOp.immediate) {
                    // retreat but advance startEl
                    return {
                        el: dir(startEl, relativeExpr[startMatch.nextCombinator].dir),
                        match: startMatch
                    };
                } else {
                    // advance (before immediate match + jump unmatched)
                    return {
                        el: el && dir(el, relativeOp.dir),
                        match: match
                    };
                }
            }
        } while (el);    // only occur when match immediate
        // only occur when match immediate
        return {
            el: dir(startEl, relativeExpr[startMatch.nextCombinator].dir),
            match: startMatch
        };
    }
735526
def _exact_match(response, matches, insensitive, fuzzy):
    '''
    
    '''
    for match in matches:
        if response == match:
            return match
        elif insensitive and response.lower() == match.lower():
            return match
        elif fuzzy and _exact_fuzzy_match(response, match, insensitive):
            return match
    else:
        return None
20819
def may_contain_matches(self, path):
        
        path = self._prepare_path(path)
        return self.int_regex.search(path) is not None
936849
def match(self, selector, index):
        """"""

        pseudo = None
        m = self.re_pseudo_name.match(selector, index)
        if m:
            name = util.lower(css_unescape(m.group('name')))
            pattern = self.patterns.get(name)
            if pattern:
                pseudo = pattern.match(selector, index)
                if pseudo:
                    self.matched_name = pattern

        return pseudo
149166
def escape_ampersand(string):
    
    if not string:
        return string
    start_with_match = r"(\#x(....);|lt;|gt;|amp;)"
    # The pattern below is match & that is not immediately followed by #
    string = re.sub(r"&(?!" + start_with_match + ")", '&amp;', string)
    return string
1159092
def match(self, name, rdclass, rdtype, covers, deleting=None):
        """"""

        if not super(RRset, self).match(rdclass, rdtype, covers):
            return False
        if self.name != name or self.deleting != deleting:
            return False
        return True
1220598
function(match, negative) {
            if (!negative) {
              negative = false;
            }
            var p = (negative) ? this.permissions.exclude : this.permissions.include;
            return (p.indexOf(match) !== -1);
          }
942330
def _match_service(self, line_with_color):
        """"""
        line = re.compile("(\x1b\[\d+m)+").sub("", line_with_color)        # Strip color codes

        regexp = re.compile(r"^\[(.*?)\]\s(.*?)$")
        if regexp.match(line):
            title = regexp.match(line).group(1).strip()
            if title in self.titles:
                return (title, regexp.match(line).group(2))
        return None
152266
function matchAll(exp, text) {
    exp.lastIndex = 0;
    var matches = [];
    var match;
    while ((match = exp.exec(text)) != null) {
        matches.push(match[0]);
    }
    return matches;
}
382799
def warnExtractFromRegexpGroups(self, line, match):
        
        file = match.group(1)
        lineNo = match.group(2)
        if lineNo is not None:
            lineNo = int(lineNo)
        text = match.group(3)
        return (file, lineNo, text)
784693
function checkIfMatch(req, res, next) {
    var clientETags;
    var cur;
    var etag = res.etag || res.getHeader('etag') || '';
    var ifMatch;
    var matched = false;

    if ((ifMatch = req.headers['if-match'])) {

        clientETags = ifMatch.split(/\s*,\s*/);

        for (var i = 0; i < clientETags.length; i++) {
            cur = clientETags[i];

            // only strong comparison

            cur = cur.replace(/^W\//, '');
            cur = cur.replace(/^"(\w*)"$/, '$1');

            if (cur === '*' || cur === etag) {
                matched = true;
                break;
            }
        }

        if (!matched) {
            var err = new PreconditionFailedError(IF_MATCH_FAIL,
                ifMatch,
                etag);
            return (next(err));
        }
    }

    return (next());
}