Getting started with Code Search

Introduction

You can search for specific files or code snippets by using the search box located at the top of the Code Search UI:

Search box

To get started, open the Code Search UI for your project:

All searches use RE2 regular expressions by default. If you don't want to use regular expressions, enclose your search in double quotation marks ( " ). For example:

"foo()" # Treats the parentheses as literals. Doesn't match 'food'.
foo() # Parentheses are treated as part of a regular expression. Matches 'food'.

Cross references

Cross references are available for some repositories. Where cross references are enabled, symbols are links to their definition. Clicking a symbol definition shows a list of usages.

What's next

  • Search for files or file contents.
  • Learn about supported operators, filters, and keyboard shortcuts in the Code Search reference documentation.