Searching code for exact matches

You can search code for exact matches in a subset of repositories on GitHub.

In this article

Exact matches in code search is in beta for a limited number of users and repositories on GitHub, and is subject to change. To request access to the beta, join the waitlist.

People with read permissions to a repository can search the repository's files for exact matches.

About searching code for exact matches

You can search code for exact matches that include any combination of letters, numbers, and symbols.

By default, searches for exact matches are case-insensitive and will include partial matches. For example, searching for let react will return let ReactDOM. Optionally, you can refine your search to be case-sensitive or to only include results that match the entire word you've searched for.

Searching code for exact matches

Searching files within a repository for exact matches only works with some repositories. For more information, see "Supported repositories."

  1. On GitHub, navigate to the main page of the repository.
  2. Press f on your keyboard to reveal the search field for exact matches.
    Exact match search field
  3. In the search field, type the string you'd like to find.
    Exact match search string
  4. Optionally, click the Options drop-down to narrow your search.
    Exact match search Options drop-down
  5. Press Enter or Return on your keyboard.
  6. In the list of results, click the file you wanted to find.

Supported repositories

Participants in the beta can search files in these public repositories for exact matches.

Further reading

Ask a human

Can't find what you're looking for?

Contact us