1
0
mirror of synced 2025-12-19 18:10:59 -05:00

Document is:fork for new code search (#35457)

Co-authored-by: hubwriter <hubwriter@github.com>
This commit is contained in:
Luke Francl
2023-03-13 03:34:56 -07:00
committed by GitHub
parent c23e976809
commit b8516f7281

View File

@@ -259,10 +259,10 @@ This query would only match files containing the term `README.md`, rather than m
### Is qualifier
To filter based on document properties, you can use the `is:` qualifier. At this time, the only value supported in this qualifier is `archived`, which restricts the search to archived repositories. For example:
To filter based on repository properties, you can use the `is:` qualifier. At this time, `is:` supports two values: `archived`, which restricts the search to archived repositories, and `fork`, which restricts the search to forked repositories. For example:
```
path:/MIT.txt is:archived
path:/^MIT.txt$/ is:archived
```
Note that the `is:` qualifier can be inverted with the `NOT` operator. To search for non-archived repositories, you can search:
@@ -271,6 +271,12 @@ Note that the `is:` qualifier can be inverted with the `NOT` operator. To search
log4j NOT is:archived
```
To exclude forks from your results, you can search:
```
log4j NOT is:fork
```
## Using regular expressions
The new code search (beta) supports regular expressions to search for patterns in your code. You can use regular expressions in bare search terms as well as within many qualifiers, by surrounding the regex in slashes.