1
0
mirror of synced 2025-12-22 11:26:57 -05:00

Fix incorrect use of "backslashes"

Regular expressions should be surrounded by _forward slashes_, but this doc referred to them as both "forward slashes" and "backslashes" in different places.
This commit is contained in:
Andrew Tennikoff
2023-01-11 08:18:36 +11:00
committed by GitHub
parent c64a663123
commit 20c87fa6c5

View File

@@ -48,7 +48,7 @@ The new code search (beta) also supports searching for an exact string, includin
You can narrow your code search with specialized qualifiers, such as `repo:`, `language:` and `path:`. For more information on the qualifiers you can use in the new code search (beta), see "[Using qualifiers](#using-qualifiers)."
You can also use regular expressions in your searches by surrounding the expression in backslashes. For more information on using regular expressions, see "[Using regular expressions](#using-regular-expressions)."
You can also use regular expressions in your searches by surrounding the expression in forward slashes. For more information on using regular expressions, see "[Using regular expressions](#using-regular-expressions)."
## Query for an exact match
@@ -273,7 +273,7 @@ log4j NOT is:archived
## 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 backslashes.
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 forward slashes.
For example, to search for the regular expression `sparse.*index`, you would use:
@@ -285,4 +285,4 @@ Note that you'll have to escape any forward slashes within the regular expressio
```
/^App\/src\//
```
```