From bf30db83760740174d111253b451b63215b448f0 Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Thu, 17 Oct 2024 15:43:35 +0000 Subject: [PATCH 1/2] Clarify case sensitive search MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous text was inaccurate – it is possible to do case sensitive searches with regular expressions. --- .../understanding-github-code-search-syntax.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/search-github/github-code-search/understanding-github-code-search-syntax.md b/content/search-github/github-code-search/understanding-github-code-search-syntax.md index 2f36a085a63c..77a51d801466 100644 --- a/content/search-github/github-code-search/understanding-github-code-search-syntax.md +++ b/content/search-github/github-code-search/understanding-github-code-search-syntax.md @@ -317,4 +317,4 @@ If code search guesses wrong, you can always get the search you wanted by using ## Case sensitivity -Code search is case-insensitive. Searching for `True` will include results for _uppercase_ `TRUE` and _lowercase_ `true`. You cannot do case-sensitive searches. Regular expression searches (e.g. for `[t][H][i][S]`) are also case-insensitive, and thus would return `This`, `THIS` and `this` in addition to any instances of `tHiS`. +Code search is case-insensitive. Searching for `True` will include results for _uppercase_ `TRUE` and _lowercase_ `true`. You can do case-sensitive searches by using a regular expression with case insensitivity turned off, for example `(?-i)True`. From f63fea4c36b826c77fd7ea374c92234a3e5274ff Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Thu, 17 Oct 2024 15:55:00 +0000 Subject: [PATCH 2/2] Note that case insensitivity is the default Saying "code search is case-insensitive" then saying "you can do case-sensitive searches" can seem confusing. Make it less confusing by noting that case insensitivity is only the default behavior. --- .../understanding-github-code-search-syntax.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/search-github/github-code-search/understanding-github-code-search-syntax.md b/content/search-github/github-code-search/understanding-github-code-search-syntax.md index 77a51d801466..f7365ecdbe1f 100644 --- a/content/search-github/github-code-search/understanding-github-code-search-syntax.md +++ b/content/search-github/github-code-search/understanding-github-code-search-syntax.md @@ -317,4 +317,4 @@ If code search guesses wrong, you can always get the search you wanted by using ## Case sensitivity -Code search is case-insensitive. Searching for `True` will include results for _uppercase_ `TRUE` and _lowercase_ `true`. You can do case-sensitive searches by using a regular expression with case insensitivity turned off, for example `(?-i)True`. +By default, code search is case-insensitive. Searching for `True` will include results for _uppercase_ `TRUE` and _lowercase_ `true`. You can do case-sensitive searches by using a regular expression with case insensitivity turned off, for example `(?-i)True`.