the part that’s right after “as retrieved on” (the date)
Is there a built in hpricot method that can search by rexep?
or will I have to use something like gsub?
the part that’s right after “as retrieved on” (the date)
Is there a built in hpricot method that can search by rexep?
or will I have to use something like gsub?
oops, I mean, grep.
oh, i got it down to this:
date = cache_date.search(‘table table > td’).inner_text.grep(/retrieved
on (.+)./)
which outputs:[“This is G o o g l e’s cache of http://www.hello.com/ as
retrieved on May 11, 2008 01:09:29 GMT.\n”]
the part that’s right after “as retrieved on” (the date)
Is there a built in hpricot method that can search by rexep?
or will I have to use something like gsub?
oops, I mean, grep.
oh, i got it down to this:
date = cache_date.search(‘table table > td’).inner_text.grep(/retrieved
on (.+)./)
which outputs:[“This is G o o g l e’s cache of http://www.hello.com/ as
retrieved on May 11, 2008 01:09:29 GMT.\n”]
How do I get rid of everything before the date?
Now I have this:
date = cache_date.search(‘table table > td’).inner_text.grep(/retrieved
on (.+)./).to_s.gsub(/.+as retrieved on /,“”).gsub(/.\n/,“”)
which gives me exactly what i need. is there a better way to doing this?