-Original Message-
From: Gabor Szabo [mailto:szab...@gmail.com]
Sent: יום ו 26 אפריל 2013 09:25
To: linux-il
Cc: Ori Idan; Meir Guttman
Subject: Re: Finding if a line contains Hebrew characters in perl
>On Thu, Apr 25, 2013 at 6:05 PM, ik wrote:
>> try this
>>
>> #
BREW}]{3}/) {
> say "yes";
> } else {
> say "no";
> }
>
> Regards,
> Meir
>
> -Original Message-
> From: Gabor Szabo [mailto:szab...@gmail.com]
> Sent: יום ו 26 אפריל 2013 09:25
> To: linux-il
> Cc: Ori Idan; Meir Guttman
On Fri, Apr 26, 2013 at 9:24 AM, Gabor Szabo wrote:
> On Thu, Apr 25, 2013 at 6:05 PM, ik wrote:
> > try this
> >
> > #!/usr/bin/env perl -w
> > #
> >
> > use v5.14;
> > use utf8;
> >
> > my $text = 'שלוabv';
> >
> > if ($text =~ /^[\x{5D0}-\x{5ea}]{3}/) {
> > say "yes";
> > } else {
> > say
On Thu, Apr 25, 2013 at 6:05 PM, ik wrote:
> try this
>
> #!/usr/bin/env perl -w
> #
>
> use v5.14;
> use utf8;
>
> my $text = 'שלוabv';
>
> if ($text =~ /^[\x{5D0}-\x{5ea}]{3}/) {
> say "yes";
> } else {
> say "no";
> }
I'd probably use \p{IsHebrew} or \p{InHebrew} instead of the hexa cod
try this
#!/usr/bin/env perl -w
#
use v5.14;
use utf8;
my $text = 'שלוabv';
if ($text =~ /^[\x{5D0}-\x{5ea}]{3}/) {
say "yes";
} else {
say "no";
}
On Thu, Apr 25, 2013 at 5:47 PM, Ori Idan wrote:
>
>
>
> On Thu, Apr 25, 2013 at 5:21 PM, ik wrote:
>
>>
>> On Thu, Apr 25, 2013 at 5:17
On Thu, Apr 25, 2013 at 5:17 PM, Ori Idan wrote:
> I have a script in perl where I read lines from a UTF-8 text file.
> I have to find out if a line contains at least 3 letters in Hebrew.
>
> How can this be done in perl?
>
What is your Perl version ?
>
> --
> Ori Idan
>
>
> __