[wplug] matching text between two words, regexp, perl.
Juan Zuluaga
jz31416 at yahoo.com
Wed Sep 27 11:34:27 EDT 2006
Excuse my very novice question on web scraping,
(and yes, I'm waiting for Mastering Regular Exp. to
arrive!)
What should be matching expression, to get all the
text found between words? (it is a multiline text)
#!/usr/bin/perl -w
use strict;
# my $UrlResumen =
"http://redalyc.uaemex.mx/redalyc/src/inicio/Resumen.jsp?iCve=$data->{numArticulo}&Id=2";
my $UrlAbstract =
"http://redalyc.uaemex.mx/redalyc/src/inicio/Resumen.jsp?iCve=25805602&Id=2";
my $textAbstract = `lynx -dump "$UrlAbstract"`;
# print $textAbstract ; #it works
if ($textAbstract =~ m/RESUMEN:\(.*\)PALABRAS
CLAVE\(.*\)OTRAS/)
{
my $AbstractChunk = $1;
my $KeywordsChunk = $2;
print $AbstractChunk;
print "\n";
print $KeywordsChunk;
}
http://socioenlinea.blog.lemonde.fr/socioenlinea/
Comentarios sobre politica, sociedad y ciencia social.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the wplug
mailing list