You can search for case-sensitive strings in GitHub:
/(?-i)my_var/
Example: https://github.com/search?q=/(?-i)\bmy_var\b/&type=code
It’s even more powerful when you realize it has full support for regular expressions (e.g., adding \b
word boundaries to match exact words).
For more details, see: