`String.prototype.search` method https://tc39.github.io/ecma262/#sec-string.prototype.search
323054
function search(regexp) {
        var O = requireObjectCoercible(this);
        var searcher = regexp == undefined ? undefined : regexp[SEARCH];
        return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
      }
1173719
def search(self, type, **args):
        """"""
        if type not in VALID_SEARCH_TYPES:
            raise GraphAPIError(
                "Valid types are: %s" % ", ".join(VALID_SEARCH_TYPES)
            )

        args["type"] = type
        return self.request(self.version + "/search/", args)
64020
def find(self, string, default=None):
        """"""
        return self.match(string) or self.search(string) or default
473492
function searchIndex(sQuery) {

		sQuery = preprocessQuery(sQuery);

		return new Promise(function(resolve, reject) {

			fetchIndex().then(function(oIndex) {

				var aSearchResults,
					oSearchResultsCollector = new SearchResultCollector();

				function searchByField(sFieldToSearch, sSubQuery, bReturnMatchedDocWord) {

					var aResults = oIndex.search(sSubQuery, createSearchConfig(sFieldToSearch));

					oSearchResultsCollector.add(aResults,
						sSubQuery,
						sFieldToSearch,
						bReturnMatchedDocWord);
				}

				// search by fields in priority order
				searchByField("title", sQuery);
				METADATA_FIELDS.forEach(function(sField) {
					lunr.tokenizer(sQuery).forEach(function(sSubQuery) {
						searchByField(sField, sSubQuery, true);
					});
				});
				searchByField("paramTypes", sQuery);
				searchByField("contents", sQuery);

				// collect all results
				aSearchResults = oSearchResultsCollector.getAll();


				resolve({
					success: !!(aSearchResults.length),
					totalHits: aSearchResults.length,
					matches: aSearchResults
				});
			});
		});
	}
395705
function(key, callback) {
      api.search({
        key: key,
        limit: this.conf.CONST.SEARCH_LIMIT
      }, callback);
    }
28586
function _hasApproximateKey(object, search) {
        var properties = Object.keys(object),
          prop, flag;
        return 0 < properties.filter(function (elm) {
          prop = object[elm];

          //avoid iteration if we found some key that equal[performance]
          if(flag) return true;

          if (isString(prop)) {
            prop = (sensitive) ? prop : prop.toLowerCase();
            return flag = (hasApproxPattern(prop, search) !== false);
          }

          return false;

        }).length;
      }
942007
def search(self, text, lookup=None):
        '''
'''
        q = self._clone()
        q.text = (text, lookup)
        return q
1179879
function search (query) {
  if (!allowSearch) {
    console.error('Assets for search still loading');
    return;
  }

  var resultDocuments = [];
  var results = index.search(query + '~2'); // fuzzy
  for (var i=0; i < results.length; i++){
    var result = results[i];
    doc = documents[result.ref];
    doc.summary = doc.text.substring(0, 200);
    resultDocuments.push(doc);
  }
  return resultDocuments;
}
495444
function instantSearch() {

    const q = $("#searchbox").val();
    if (q === '')
        return;

    const matcher = "/matcher?beginsWith=" + q;
    const request = host + matcher;

    console.debug(request);

    $.getJSON(request, '', {})
        .done(data => {

            $("#searchbox").autocomplete({
                source: data,
                select: (event) => {
                    event.stopPropagation();
                    $("#search").trigger("click");
                }
            });
        })
        .fail((d, textStatus, error) => {

            const err = d.status + " " + error + " -> message: " + d.responseText;
            bootstrapAlert.error(err);
            console.error(`Search request failed: \n ${err}`);
        });
}
508888
function(globString) {
        this.regexp = new RegExp(PatternMatcher.regexpFromGlob(globString));
        this.matches = function(actual) {
            return this.regexp.test(actual);
        };
    }
1113071
def search(context, keywords, module, raw, kind):
    
    logging.info(_('Entering search mode'))
    sense = context.obj['sense']
    func = sense.query_names if module else sense.query_info
    none = True
    for keyword in keywords:
        output = func(keyword, raw, kind)
        if output:
            none = False
            print(output)
        else:
            logging.warning(_('No results: %s'), keyword)
    sys.exit(1 if none else 0)
547111
function searchAndCompare(specObject, comparisonObject, currentDescription) {

    if (comparisonObject === undefined) {
        comparisonObject = {};
    }

    for (var key in specObject) {
        if (specObject.hasOwnProperty(key)) {
            currentDescription.push(key);
            if (typeof(specObject[key]) === "string") {
                compare(specObject[key], comparisonObject[key], currentDescription);
            } else {
                searchAndCompare(specObject[key].specs, comparisonObject[key], currentDescription);
            }
            currentDescription.pop();
        }
    }
}
179034
function search(stream, needle) {

  var ss = new streamsearch(needle),
      push = ss.push.bind(ss);
  ss.maxMatches = 1;

  var defered = defer();
  stream.on("data", push);

  stream.once("finish", function(){
    defered.reject("No stub found in stream")
  });

  var pos = 0;

  ss.on("info", function(isMatch, data, start, end){
    if(data)
      pos += end - start;

    if(!isMatch)
      return;

    stream.removeListener("data", push);
    defered.resolve(pos);
  });
  return defered;
}
714351
function search(options, callback) {
  var queryURI = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=' + options.terms + '&retmode=json&retmax=' + (options.count || 10);
  utils.retrieve(queryURI, callback);
}
232840
private @CheckForNull HashedToken searchMatch(@Nonnull String plainSecret) {
        byte[] hashedBytes = plainSecretToHashBytes(plainSecret);
        for (HashedToken token : tokenList) {
            if (token.match(hashedBytes)) {
                return token;
            }
        }
        
        return null;
    }
92053
function(query, options) {
            var nresults = 0, content;

            // Define options
            options = _.defaults(options || {}, {
                silent: false,
                caseSensitive: false
            });

            query = options.caseSensitive ? query : query.toLowerCase();

            nresults = this.filter(function(model, item) {
                content = this.options.searchAttribute != null ? model.get(this.searchAttribute, "") : item.$el.text();
                content = options.caseSensitive ? content : content.toLowerCase();
                return content.search(query) >= 0;
            }, this);

            if (!options.silent) this.trigger("search", {
                query: query,
                n: nresults
            });

            return this;
        }
690519
def search(query)
      regex = Regexp.new(query, 'i')
      _cookbooks.collect do |_, v|
        v[v.keys.first] if regex.match(v[v.keys.first].name)
      end.compact
    end