The regexp engine is RE2. Most of Perl's regexes are supported, except for lookaround and backreferences. See RE2's syntax guide.
We support the following filters:
- Only files containing...
- Search in files containing given regex. Useful if you want to search only in files importing a certain module or using a certain feature.
- Only paths matching...
- Search paths matching given regex.
- Case-insensitive search
- What it says on the tin.
- Space-insensitive search
- Treat single spaces as "one or several spaces". For exactly one space, add a backslash. You actually want this to be enabled most of the time you're searching for code, but it's still experimental so we don't enable it by default yet.
- Precise match
- Don't interpret regex syntax, just search for the string.
- Sources only
- Uncheck this checkbox to search through everything contained in the packages, not just source files and package manifests.
How it works
We download all packages and build an index with Google's open-source Codesearch engine. We've modified the engine for this project; our fork lives at aelve/codesearch-engine. In the future we might switch to the more modern Zoekt, abandon indexing entirely and embrace ripgrep, or implement some combination of those.
If you want to understand how exactly search with regular expressions is possible, take a look at "Regular Expression Matching with a Trigram Index".