I think it would be a great idea if we had a regular expression search engine, but can it be done? It seems impossible since there's no feasible way of indexing such a huge amount of data properly and displaying results in the order of relevance from what I can think of.
I'm curious what the answer to this one would be.
1 Answer 1
It can be done, and it has been done: http://www.google.com/codesearch
I think it is useful here because this is in a specific domain where the users might be expected to understand regexes. I suspect in general the feature is not that useful to the vast majority of Google users so there is probably no commercial reason to do it.
-
This is great but the source code on codesearch is a very tiny fraction of the web pages indexed by Google. I suspect there are some limitations because the commercial reason argument isn't that strong (they do have a number of useful keywords like site, filetype, intitle, inurl etc.). I think the load on their servers would be too great for regex searches.Valentin Brasso– Valentin Brasso2011年04月28日 10:48:56 +00:00Commented Apr 28, 2011 at 10:48
-
4If Google thought Regex would be useful to enough people they could scale. They scaled for instant answers, that was a huge effort. Search is worth billions of ,ドル if regex gave them an advantage they would do it, but 99% of users have no idea what a regex is, so it is simply not worth the effort.Steve– Steve2011年04月28日 10:50:59 +00:00Commented Apr 28, 2011 at 10:50
-
Google doesn't shy away from throwing hardware at a problem.JeffO– JeffO2011年04月28日 12:04:13 +00:00Commented Apr 28, 2011 at 12:04
-
2Note that Google Code Search is being retired.MetaEd– MetaEd2011年11月08日 21:05:30 +00:00Commented Nov 8, 2011 at 21:05
-
2has been retired now!Vaibhav Garg– Vaibhav Garg2012年02月09日 11:10:48 +00:00Commented Feb 9, 2012 at 11:10