Skip to content
Discussion options

You must be logged in to vote

Currently, there is no regex support for the REST API when searching for code. Instead, one must use the WebUI1 for regex searches.

I can't see any documentation around this.

The docs2 note that characters for regex search are simply ignored in the API.

There has been no official announcement or blog post from GitHub about adding regex support to the code search REST API. The only indication thus far is a comment3 from a GitHub staff member about a year ago, suggesting it will be implemented but it's not ready yet.

Footnotes

  1. Understanding GitHub Code Search syntax - Using regular expressions - GitHub Docs

  2. Searching code (legacy) - GitHub Docs

  3. 🚢 New code search and code view fe…

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by chriscn
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API and Webhooks Discussions related to GitHub's APIs or Webhooks Question Ask and answer questions about GitHub features and usage inactive This discussion has been automatically marked as inactive. This was formerly labeled stale.
5 participants