Learn Sourcegraph's powerful search syntax to find code faster across your repositories. This guide covers the four main pattern types (keyword, literal, regex, structural), context filters (repo, file), exclusions, and boolean operators. Master these techniques to turn simple searches into powerful code audit tools.
00:00 - Introduction to Sourcegraph Search Syntax
00:12 - Four Main Pattern Types Overview
00:25 - Literal Search with Quotes
00:34 - Regex Search with Forward Slashes
00:39 - Structural Search for Code Patterns
00:50 - Context Filters for Precision
00:58 - Repo Filter
01:12 - File Filter for Specific Paths
01:36 - Context Filter for Repository Groups
01:45 - Exclusions with Minus Sign and "Not"
01:55 - Removing Test Files from Results
02:02 - Boolean Operators (AND, OR)