Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: RegEx: Detecting the certain cyrillic words

by choroba (Chancellor)
on Mar 01, 2013 at 18:11 UTC ( #1021311=note: print w/replies, xml ) Need Help??


in reply to Re^2: RegEx: Detecting the certain cyrillic words
in thread RegEx: Detecting the certain cyrillic words

Have you saved the script as utf-8?
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
  • Comment on Re^3: RegEx: Detecting the certain cyrillic words

Replies are listed 'Best First'.
Re^4: RegEx: Detecting the certain cyrillic words
by programmer.perl (Beadle) on Mar 01, 2013 at 18:17 UTC
    Yes, I saved the script as utf-8. I'm using gedit 3.4.1 and character encoding is "Current Locale UTF-8"
    Enough codes make shapes. (Hamidjon)
      Weird. Works for me:
      #!/usr/bin/perl use warnings; use strict; use utf8; use WWW::Mechanize qw(); my $mech = WWW::Mechanize->new; $mech->credentials('user' => 'pass'); $mech->get('http://kreml.ru/'); my $content = $mech->text(); $content =~ s/\n\r//g; binmode STDOUT, ':utf8'; print $1,"\n" if $content =~ /(\bКремл&# +1100;.*\"\b)(.*)/i;
      The regex looks like this in fact:
      $content =~ /(\bКремль.*\"\b)(.*)/i
      
      لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1021311]
help
Chatterbox?
[johngg]: Yes, must be nearly 30 years ago.
[hippo]: Loudest gig I can recall was Wolfsbane at the Astoria in the early 90s. Head rang for about 3 days afterwards. They were top, though.
[johngg]: My ears are still ringing!
Discipulus was outside The Clash concert in 1985..
[marto]: Wolfsbane , now I'm having flashbacks

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (13)
As of 2017-03-24 12:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (301 votes). Check out past polls.