Unfortunately, because of how GitHub Search handles tokenization, searching for IPs themselves is bound to be difficult. Content on GitHub is broken into chunks by the search index, and only these chunks (or “tokens”) are searchable. The search index tries to find natural word breaks to split at – like case transitions (e.g. “FooBarBaz”) or non-word characters (e.g. the hyphen in “jquery-tictactoe”).
In the first example, “FooBarBaz” would be broken into the following tokens:
foobarbaz. Only those words will be searchable. Searching for
foobar will not find occurrences of “FooBarBaz”.
In the second example, “jquery-tictactoe” would be broken into the following tokens:
jquery-tictactoe. So searching
tictactoe would match, but searching
tictac would not.
Note that the search query itself is only tokenized on whitespace and punctuation, not on case transitions like the content that lives on GitHub. For example, if a user types “FooBarBaz” in the search bar, GitHub does not generate
baz tokens for the search query – They will only be searching for the one token
foobarbaz. So they will find occurrences of
FooBarBaz on GitHub, but they won’t find occurrences of
Breaking on special characters
Most special characters are thrown out after being used by the tokenizer to split words. (See the full list in the Considerations for code search article.) They are not searchable, and there’s no way to escape them or change this behavior.
Hope this helps!