|
|
| Think about Loose Coupling | |
| PerlMonks |
Re: RegEx: Detecting the certain cyrillic wordsby daxim (Hermit) |
| on Mar 01, 2013 at 15:38 UTC ( #1021285=note: print w/ replies, xml ) | Need Help?? |
|
#!/usr/bin/perl
use utf8;
use strict;
use warnings FATAL => 'all';
use WWW::Mechanize qw();
my $mech = WWW::Mechanize->new;
$mech->credentials('user' => 'password');
$mech->get('http://www.rambler.ru/');
my ($Кремль) = $mech->content =~ /(Кремль)/i;
You very likely want to use Web::Query to dissect your HTML instead of regex, or at least match against the HTML-stripped text version of the document.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||