ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

How to use Google to collect specific text snippets?

(1/1)

David.P:
Hi Forum,

ok, this might be getting a little tricky....

Does anyone know whether there is a way to get text excerpts from Google -- using something like a regular expression or advanced search syntax?

For example, I'd like to get all text snippets from Google (or from Google's cache) that start with a certain sequence of words, and end with another sequence of words.

The following type of search syntax doesn't work, unfortunately, when starting sequence and end sequence are further than a few words apart: "once upon a time * and they all lived happily ever after".

And even if that syntax wood work, it would of course only yield links to pages that contain both starting sequence and end sequence, but not the actual text between, and including, starting sequence and end sequence...

Any ideas.......?

Cheers David.P

Curt:
"once upon a time" +"and they all lived happily ever after"

Edited:
SORRY! Only now I think I understand your question. However, I cannot see how you can expect the search engine to tell you what you haven't asked for, so to speak.

rjbull:
I haven't tried it, but there are a few mentions on DC of Yahoo! Pipes, which might do what you want.  See, e.g., How to automatically collect posts from a forum (that match a criteria)?

parkint:
I believe Google accepts Regular Expressions.
Why not simply TRY IT AND SEE?

I used the string below (no quotes) and got some very interesting results.

/^[once upon a time]\S+[lived happily ever after]/

A variation would be
/^[once upon a time]\W+[lived happily]/

Good luck.

David.P:
@parkint, thanks -- not sure about the regular expressions. This discussion is mainly about Gmail, but they mention Google Web Search as well.

@rjbull, thank you, I will definitely have a closer look at Yahoo! Pipes wich looks very promising.

Cheers David.P

Navigation

[0] Message Index

Go to full version