18

So let's say I have an issue with some code and I want to use google to help find a solution. So I paste a code snippet into the search bar. Google will ignore any special characters like operators (especially the '.' operator), returning results that aren't as relevant as I'd like. This is true even when encasing it in double quotes. It's also annoying when trying to use something like 'C#' as part of a search. Does anyone know of a search engine that respects your special characters?

ale
  • 6,267
  • 6
  • 54
  • 64
Joel Coehoorn
  • 362,140
  • 107
  • 528
  • 764
  • 2
    C# works for me with Google. (Bias: I work there.) If I search for "C#" it gives me entirely C#-related hits - in particular, very different ones to if I search for just "C". – Jon Skeet Oct 23 '08 at 05:25

9 Answers9

6

We were frustrated by this too, so we made a search engine that allows special characters!

try http://www.symbolhound.com

it's a web search (unlike google codesearch) that respects symbols. This should help. The index is growing every day, so you should be able to find relevant responses!

Good luck.

tcf628
  • 1,674
  • 16
  • 7
4

On krugle, a search for "cs[i]" in quotes seems to work... as it does also in google codesearch...

jumar
  • 5,236
  • 7
  • 43
  • 42
2

Also you should try using quotes around things with sensitive characters like the +.

Searching for $i++ found 0 results.
Searching for "$i++" found 707,000 results.


@Greg

Using Google Code search with cs[i] results in 2,450,000 results and finds strings with csi
Using Google Code search with "cs[i]" results in 74,700 results and finds strings with cs[i]

Joseph Pecoraro
  • 2,820
  • 1
  • 18
  • 25
2

Unfortunately, it seems workarounds are in order. I've found that searching for csharp or c sharp seems to be necessary. I've also used "Ansi C" or "c99" to search on C instead of C++.

I know google code search seems to suffer the same issues, although it does have a regex engine.

Neil Neyman
  • 1,991
  • 15
  • 21
1

I think that you should have a look at google codesearch

jumar
  • 5,236
  • 7
  • 43
  • 42
1

What about Koders?

Koders is a free public code search engine for open source code. The database that underlies Koders contains 3.3 billion lines of code and reflects the contents of the majority of world’s major open source repositories, with syntax-highlighting for over 30 programming languages. The search database is further enhanced with additional code and metadata from the Black Duck KnowledgeBase, the industry’s most complete database of open source and third-party code.

Seki
  • 10,429
  • 5
  • 39
  • 63
Joril
  • 17,682
  • 13
  • 64
  • 84
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – oleksii Aug 31 '12 at 12:11
  • What do you mean, the essential parts of the answer? The question asks about a search engine, and the link points to one :) – Joril Aug 31 '12 at 20:18
  • This answer has come up in the SO review area as a low quality one. It is better to include some info from that link, as it may become invalid tomorrow, next week, or next year... But people will still try to find an answer. – oleksii Aug 31 '12 at 20:24
0

" Google will ignore any special characters " !!! And all other search engines apparently are just as bad now. Even ALtaVista advanced, which used to find these i9s brain demmaged too.

It sure saves them indexing time, but if I try to find something like email addresses at some company say "@comcast.com" it ignores "@" and brings thousands of useless pages.

There are many other occasions, when ignoring special characters makes Google and other search engines utterly useless. Very frustrating!

Any search engine that does not ignore these?!!

0

the firefox search box strips some special characters, particularly the # from C#. Googling direct does not

Colin Pickard
  • 43,301
  • 13
  • 91
  • 143
-1

Edit: I tested with http://code.google.com, not http://www.google.com/codesearch - odd that they don't return the same results.

Google code search doesn't work either - searching for something like "cs[i]" brings back hits for "csi".

I really doubt there's any general-purpose searching tool that takes programming syntax into consideration - it's just much too specialized. There may be search products/appliances out there, but they're likely to be pointed at private codebases, not intended for public search.

Greg Hurlman
  • 17,247
  • 6
  • 50
  • 84