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 9c8cf017f5ed..b4a5effc1b32 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 @@ -316,3 +316,11 @@ By default, code search is case-insensitive, and results will include both upper ```text /(?-i)True/ ``` + +## Whole Words + +If you want your search string to be matched as a whole word, you need to use a regular expression that includes the word boundary token `\b`. For example, to search for the string "True" as a whole word, you would use: + +```text +/\bTrue\b/ +```