views:

264

answers:

4

Google is unfriendly to searching for verbatim strings with characters like $ and #. Is there a search engine that supports searching for verbatim strings?

A: 

If you're actually looking for code examples, I like using Krugle. It has a fairly comprehensive set of open source code.

If you're searching for error messages and the like, I still haven't found anything...

Topher Fangio
+13  A: 

Try http://www.google.com/codesearch

Just remember that it's a REGEXP language, so to search for $value, use \$value.

For example:

http://www.google.com/codesearch?hl=en&lr=&q=\%24value&sbtn=Search

Josh
Or were you looking for a non-code search?
Josh
Well, yes, a non-code search (primarily documentation!), although I upvoted you 'cause I didn't know about the codesearch page.
Jason S
I'm not aware of a non-code search engine that can support what you need, but then again I really only use Google :)My only advice would by to search for the context of what you're looking for, rather than the verbatim string. Fairly unhelpful, I know!
Josh
+1  A: 

this one would be cool if more was covered....

http://start.gotapi.com/

or

http://www.gotapi.com/html for the html version

you can also go here and check out more, obviously

CheeseConQueso
A: 

I don't think there is an easy way around something like this. When I work with Tcl I search at ActiveState's website, when I do C# I go to MSDN, Python, I go to python.org. Is there a specific reason you need a central location rather than going to the handful of main programming sites for each language/environment ( besides being lazy =D )? Maybe a better question would be "What sites are the best to search for [insert favorite programming language]?" because I think you'll find that most search engines have to make exclusions for performance since so many people use them for different reasons. Better to just find a site that focuses on your subject matter and then search.

pokstad
Use case: I am looking for some information on the "for" loop in C. Try looking for "for" and "C" in google. There's no centralized resource for C, I like google as a centralized search engine but it loses for code so I am looking for another search engine.
Jason S
(that use case was not actually what I'm looking for, it's a possible use case)
Jason S
Or I want to look for a literal string containing a punctuation character. Again, google loses. In any case I often look for things which have no obvious central location. For the ones that do, I don't need to ask this question.
Jason S
Try searching through this part of Google: http://directory.google.com/Top/Computers/Programming/It has much fewer websites, but it definitely limits your search results to a specific subject without being tied to a central website (other than the search engine). This would probably be a good resource for people new to a language or framework, but not suitable for more advanced questions (which stackoverload is awesome for).
pokstad