topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 12:21 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: How to use Google to collect specific text snippets?  (Read 4004 times)

David.P

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 207
  • Ergonomics Junkie
    • View Profile
    • Donate to Member
How to use Google to collect specific text snippets?
« on: May 28, 2010, 05:28 AM »
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

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
Re: How to use Google to collect specific text snippets?
« Reply #1 on: May 28, 2010, 11:05 AM »
"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.
« Last Edit: May 28, 2010, 04:13 PM by Curt »

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 3,199
    • View Profile
    • Donate to Member
Re: How to use Google to collect specific text snippets?
« Reply #2 on: May 28, 2010, 04:07 PM »
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

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 119
  • It's bad luck to be superstitious
    • View Profile
    • Donate to Member
Re: How to use Google to collect specific text snippets?
« Reply #3 on: May 28, 2010, 08:11 PM »
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

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 207
  • Ergonomics Junkie
    • View Profile
    • Donate to Member
Re: How to use Google to collect specific text snippets?
« Reply #4 on: May 29, 2010, 09:50 AM »
@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