Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

It would be very useful if Google provided a regular expression search.

Is there a way to do this?

(OBS: I am not talking about false regular expressions like site:, filetype:, AND, OR or "Text". I would like to search with a regular expression like .+[]^).

For example, is there an application, a site or a Google tool to search things like *.stackexchange?

share|improve this question
    
There is a website called boolify.org that can generate some types regular expressions for Google Search. I think this is about as close as you can get to a "regex search" option. –  Anderson Green Sep 26 '12 at 1:37
add comment

migrated from webmasters.stackexchange.com Oct 8 '11 at 22:00

This question came from our site for pro webmasters.

7 Answers

up vote 16 down vote accepted

This feature is not available in classic Google Search and it's not in Google's roadmap. You can learn more about this topic watching the Google video Will Google implement the ability to search with regular expressions?

However, there's one exception. Google Code Search supports regular expressions. Of course, the search target for this topic search engine is reduced to source code only.

It is worth to mention that some Google search keywords can partially replace regular expressions. For example, if you want to search any two-word variation of "search TERM", you can use the wildcard operator.

search *

will find results for search and any other (one) word. I often use it to check basic English grammar rules or synonyms (e.g., "as easy as *").

share|improve this answer
    
Google Code Search no longer exists, but there may be alternatives (not that it's relevant to this question) –  musefan Aug 29 '13 at 10:29
add comment

SymbolHound has an open source code repository search, similar to the now-discontinued Google Code Search option, in addition to a symbol-inclusive web search that indexes programming-related sites such as Stackoverflow.

share|improve this answer
1  
If you are affiliated with SymbolHound please can you state this in your profile. Thanks! –  Barry Jan 20 '12 at 11:18
add comment

No, unfortunately not :(. In theory you could make your own search engine and do it, but that would be pretty hard.

share|improve this answer
add comment

For example, is there a app or a site

Blekko does a Web Grep on a daily basis:

Everyday, we will run 2 map jobs against our crawl of 4 billion pages. These will be greps for strings, patterns, regex expressions that blekko users submit to us and decide are cool. Got a grep you want to run? Submit it here. If enough people agree with you that this grep is interesting (by voting it up), we’ll run it. And we’ll post the results here. We make the top 500 results for every grep available for free to anyone who wants it.

While it's not exactly what you want, it's the closest that comes to it.

share|improve this answer
    
Very intesting this Blekko site. It's not really a regex but it's a good improvement to web search. Thx about show me this. –  GarouDan Oct 18 '11 at 23:09
    
You're welcome @GarouDan –  Sathya Oct 19 '11 at 6:55
add comment

You can write a piece of software to:

  1. Take the keywords from the regular expression;
  2. Google the keywords and get a list of results;
  3. Crawl each resulting URI and filter it with complete regular expression.

Let's study a case: from site:gog.com find all games that have Spanish voice-over.

The regular expression is:

Audio[^:]*:[^.,]*Spanish

It shall match, for example:

Audio lanuage: English, German, Spanish, French.

And not match:

Audio language: only-English. Text language: Spanish.

Step 1. Let your software search this on Google:

site:gog.com audio Spanish inurl:game

inurl:game here means only search in game description pages

Step 2. Get the 300 resulting links and crawl into every one of them.

Step 3. Filter the result with the given regular expression:

Audio[^:]*:[^.,]*Spanish

This should be easy to build. In fact I don't understand why I couldn't find something that is already built that way.

Since search engines can't afford the resource to scan their data with regular expression, this dirty job falls on your part, and your computer should do that with what search engines already provide.

share|improve this answer
    
+1. Thx a lot. This is a very interesting idea, in fact. The main problem is that we probably will need high performance clusters to do something really interesting. –  GarouDan Oct 25 '13 at 19:05
add comment

You could start with a detailed Google search to cull the target text to search. Then open, say, the top 50 results in multiple tabs and use mingyi's "Fastest Search" Firefox addon to search the results using a regular expression.

share|improve this answer
add comment

Google now supports and fully documents the use of RegEx. Here is the link for reference:

http://www.google.com/support/enterprise/static/postini/docs/admin/en/admin_ee_cu/cm_regex.html

share|improve this answer
2  
That's only for Postini. –  Al E. Dec 27 '13 at 16:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.