ISALPHA
am 09.10.2007 20:50:39 von fred78980To take into account words with accent I wrote this while ($txt =~ /
\p{IsAlpha}/); The script does not give error message but it doesn't
work.
Your help is appreciated
Thanks
To take into account words with accent I wrote this while ($txt =~ /
\p{IsAlpha}/); The script does not give error message but it doesn't
work.
Your help is appreciated
Thanks
fred78980@yahoo.com wrote:
> To take into account words with accent I wrote this while ($txt =~ /
> \p{IsAlpha}/); The script does not give error message but it doesn't
> work.
> Your help is appreciated
There isn't an error, so how do you know it didn't
"work". Post a short and complete example showing the issue.
fred78980@yahoo.com wrote:
> To take into account words with accent I wrote this while ($txt =~ /
> \p{IsAlpha}/); The script does not give error message but it doesn't
> work.
> Your help is appreciated
perldoc perllocale
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
At 2007-10-09 02:50PM, "fred78980@yahoo.com" wrote:
> To take into account words with accent I wrote this while ($txt =~ /
> \p{IsAlpha}/); The script does not give error message but it doesn't
> work.
> Your help is appreciated
I don't see "IsAlpha" in the perlunicode man page. Perhaps you want
"Letter" or "Alphabetic" instead.
--
Glenn Jackman
"You can only be young once. But you can always be immature." -- Dave Barry
Glenn Jackman wrote:
> At 2007-10-09 02:50PM, "fred78980@yahoo.com" wrote:
>> To take into account words with accent I wrote this while ($txt =~ /
>> \p{IsAlpha}/); The script does not give error message but it doesn't
>> work.
>> Your help is appreciated
>
> I don't see "IsAlpha" in the perlunicode man page. Perhaps you want
> "Letter" or "Alphabetic" instead.
perldoc perlre
[ SNIP ]
The following equivalences to Unicode \p{} constructs and equivalent
backslash character classes (if available), will hold:
[:...:] \p{...} backslash
alpha IsAlpha
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
Quoth krahnj@telus.net:
> fred78980@yahoo.com wrote:
> > To take into account words with accent I wrote this while ($txt =~ /
> > \p{IsAlpha}/); The script does not give error message but it doesn't
> > work.
> > Your help is appreciated
>
> perldoc perllocale
No. \p is a Unicodeism; locales and Unicode do not play well together
under current versions of perl. The locale-friendly version would be
use bytes; # just for good measure
use locale;
$txt =~ /[[:alpha:]]/;
Ben