Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to search for special characters in Github

Is there any possibility to search github repos for strings containing a special characters (e.g. "example.com" or "Example: ").
As far as I know Github's search does not support it and Google ignores this as well.

Thanks in advance.

like image 501
Tim P Avatar asked Jan 07 '17 17:01

Tim P


People also ask

How do I search for a specific code on GitHub?

GitHub Codesearch can be found at github.com/codesearch and will let you type in anything you're looking for in source code and get highlighted results of any files in our public repositories that match. You will also get a sidebar with the facet counts of language breakdown of the results and repository breakdowns.

How do I find exact strings in GitHub?

state the specific string you're looking for using the "intext:" search operator. add the programming language you're interested in, using the "ext:" operator (i.e. "ext:py", "ext:R", "ext:rb", etc.) search in all public repos in Github using the "site:" operator mrgloom mentioned.

How do I escape the special characters in git?

To escape a character, simply add a backslash ( \ ) before it. As you can see, the double quotes with the backslash are shown, but the ones without it are used as string delimiters.

Does GitHub search support regex?

Github has its own search syntax with qualifiers you can add, but not full regex.


1 Answers

The GitHub Help says :

You can't use the following wildcard characters as part of your search query: . , : ; / \ ` ' " = * ! ? # $ & + ^ | ~ < > ( ) { } [ ]. The search will simply ignore these symbols.

Alternatively, you can git clone some repositories and grep them.

like image 142
Ortomala Lokni Avatar answered Oct 11 '22 07:10

Ortomala Lokni