in reply to Re: Regex to match string with numbers with possible comma
in thread Regex to match string with numbers with possible comma
#!/usr/bin/perl use LWP::Simple; use strict; $|=1; my $url = "www.tek-tips.com"; my $altavista = "http://www.altavista.com/web/results?q=url:$url&kl=XX +&search=Search"; my $content = get("$altavista"); my @lines = split /\n/, $content; my $results; foreach (@lines) { $results = $1 if $_ =~ m/Altavista found ([\d,]+) results/; } print "searched: $altavista\n"; print "results: $results";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Regex to match string with numbers with possible comma
by pboin (Deacon) on Mar 17, 2004 at 16:35 UTC | |
by Anonymous Monk on Mar 17, 2004 at 16:42 UTC |