views:

45

answers:

2

Is there a way to search the web which does NOT remove punctuation? For example, I want to search for window.window->window (Yes, I actually do, this is a structure in mozilla plugins). I figure that this HAS to be a fairly rare string.

Unfortunately, Google, Bing, AltaVista, Yahoo, and Excite all strip the punctuation and just show anything with the word "window" in it. And according to Google, on their site, at least, there is NO WAY AROUND IT.

In general, searching for chunks of code must be hard for this reason... anyone have any hints?

+4  A: 

google codesearch ("window.window->window" but it doesn't seem to get any relevant result out of this request)

There is similar tools all over the internet like codase or koders but I'm not sure they let you search exactly this string. Anyway they might be useful to you so I think they're worth mentioning.

edit: It is very unlikely you'll find a general purpose search engine which will allow you to search for something like "window.window->window" because most search engines will do some processing on the document before storing it. For instance they might represent it internally as vectors of words (a vector space model) and use that to do the search, not the actual original string. And creating such a vector involves first cutting the document according to punctuation and other critters. This is a very complex and interesting subject which I can't tell you much more about. My bad memory did a pretty good job since I studied it at school!

BTW they might do the same kind of processing on your query too. You might want to read about tf-idf which is probably light years from what google and his friends are doing but can give you a hint about what happens to your query.

f4
I knew as soon as I read the question that I wasn't going to be fast enough. ;)
Bill the Lizard
+1 Nice to learn that this doesn't just search the google hosted codebase (I assumed that it did when I saw the name)
Sean Vieira
@Sean me too, which is why I didn't think of it!
Brian Postow
Actually, this DOES seem to only search the google codebase... And I actually want to search more than just code, because I want to see references to people talking ABOUT it, etc...
Brian Postow
it searches only code but not only google's code
f4
@f4 are you sure? When I do the search, I only get code from google code (not code from google itself, but code google is hosting)
Brian Postow
search for "test" for instance, you'll find code hosted on sourceforge, github...
f4
A: 

There is no way to do that, by itself in the main Google engine, as you discovered -- however, if you are looking for information about Mozilla then the best bet would be to structure your query something more like this:

"window.window->window" +Mozilla 
                     OR +XUL
                        + Another search string related to what you are 
                          trying to do.
Sean Vieira