1

I'd like to search for code inside a github repository, which contains lines like this :

echo a && echo b

I'm trying to search && inside that repository, but I've got an error message :

We could not perform this search

The search contains only logical operators (AND / OR / NOT) without any search terms.

I can't manage to escape these ampersands. There is no match found, neither with \&\& nor '&&' nor "&&".

How can I perform that search ?

Bilow
  • 2,194
  • 1
  • 19
  • 34

1 Answers1

2

Since my previous answer, the GitHub help page has been updated.
It does not seem possible:

You can't use the following wildcard characters as part of your search query:

. , : ; / \ ` ' " = * ! ? # $ & + ^ | ~ < > ( ) { } [ ]. 

The search will simply ignore these symbols.

So escaping (\&) or even &amp; don't work, because they include symbols which are ignored by the search query.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250