How to detect Arabic chars using perl regex?
I'm parsing some html pages, and need to detect any Arabic char inside.. Tried various regexs, but no luck.. Does anyone know working way to do that? Thanks Here is the page I'm processing: http://pastie.org/2509936 And my code is: #!/usr/bin/perl use LWP::UserAgent; @MyAgent::ISA = qw(LWP::UserAgent); # set inheritance $ua = LWP::UserAgent->new; $q = 'pastie.org/2509936';; $request = HTTP::Request->new('GET', $q); $response = $ua->request($request); if ($response->is_success) { if ($response->content=~/[\p{Script=Arabic}]/g) { print "found arabic"; } else { print "not found"; } } mob EDIT (as