AFAIK you would need to set that up yourself. Github has its own search syntax with qualifiers you can add, but not full regex. The api uses the same syntax as the in-browser search.
Answer from ldg on Stack OverflowAFAIK you would need to set that up yourself. Github has its own search syntax with qualifiers you can add, but not full regex. The api uses the same syntax as the in-browser search.
The problem is that a GitHub search is limited to the master branch of your repos.
The easiest solution is to:
- clone your company's github source website
- do locally a
git grep, which supports basic regexp or extended POSIX regexp (git grep -E) - or a pickaxe search (
git log --all -S... - or
git rev-list --all|grep xxxwhich also allows for regexp
Can you use regular expressions on GitHub?
Support Regular expressions in advanced search and search API
Support RegEx in Repository Search (Filter)
Show HN: Search code in GitHub repos using regular expressions
Sometimes, I want to specifically search for: "createClient({legacyMode: true})", but when I search I get "createClient()" instead, so is there a way to search for a specific string or use regex when using GitHub? There doesn't seem to be a lot of advanced search options.