From: nicolas_laurent545 on
This command perl -pi -e 's/(\p{IsAplha}+)(é)(\s)/($1$2)/g' text.txt
returns
Can't find Unicode property definition "Aplha" at -e line 1, <> line 1.

What should I do to correct the problem ?

Thanks

From: Tobias Witek on
nicolas_laurent545(a)hotmail.com wrote:
> This command perl -pi -e 's/(\p{IsAplha}+)(?)(\s)/($1$2)/g' text.txt
> returns
> Can't find Unicode property definition "Aplha" at -e line 1, <> line 1.
>
> What should I do to correct the problem ?

I guess you could probably try to spell "Alpha" correctly.

I am not an expert in Perl, but that might fix your problem :-D
From: Dr.Ruud on
nicolas_laurent545 schreef:

> perl -pi -e 's/(\p{IsAplha}+)(?)(\s)/($1$2)/g' text.txt
> returns
> Can't find Unicode property definition "Aplha"
> at -e line 1, <> line 1.
>
> What should I do to correct the problem ?

See "perldoc perlre": IsAlpha

--
Affijn, Ruud

"Gewoon is een tijger."


From: nicolas_laurent545 on

Tobias Witek a écrit :

> nicolas_laurent545(a)hotmail.com wrote:
> > This command perl -pi -e 's/(\p{IsAplha}+)(é)(\s)/($1$2)/g' text.txt
> > returns
> > Can't find Unicode property definition "Aplha" at -e line 1, <> line 1.
> >
> > What should I do to correct the problem ?
>
> I guess you could probably try to spell "Alpha" correctly.
>
> I am not an expert in Perl, but that might fix your problem :-D

I am sorry but still have the problem with unicode.

perl -pi -e 's/(\p{IsAlpha}+)(é)(\s)/($1$2)/g' text.txt
This tell perl to take this as input
input:détrôné ôperaé ôpéraé tônâné tûtéé
expected output:(détrôné) (ôperaé) (ôpéraé) (tônâné)
(tûtéé)
actual output: détrô(né)ô(peraé)ôpé(raé)tônâ(né)tûtéé

From: anno4000 on
<nicolas_laurent545(a)hotmail.com> wrote in comp.lang.perl.misc:
>
> Tobias Witek a ?crit :
>
> > nicolas_laurent545(a)hotmail.com wrote:
> > > This command perl -pi -e 's/(\p{IsAplha}+)(?)(\s)/($1$2)/g' text.txt
> > > returns
> > > Can't find Unicode property definition "Aplha" at -e line 1, <> line 1.
> > >
> > > What should I do to correct the problem ?
> >
> > I guess you could probably try to spell "Alpha" correctly.
> >
> > I am not an expert in Perl, but that might fix your problem :-D
>
> I am sorry but still have the problem with unicode.
>
> perl -pi -e 's/(\p{IsAlpha}+)(?)(\s)/($1$2)/g' text.txt
> This tell perl to take this as input
> input:d?tr?n? ?pera? ?p?ra? t?n?n? t?t??
> expected output:(d?tr?n?) (?pera?) (?p?ra?) (t?n?n?) (t?t??)

I wouldn't expect any blanks in the output because the substitution
pattern doesn't use $3. So I'd expect

(d?tr?n?)(?pera?)(?p?ra?)(t?n?n?)(t?t??)

and that's what I get.

> actual output: d?tr?(n?)?(pera?)?p?(ra?)t?n?(n?)t?t??

What version of Perl?

Anno
 |  Next  |  Last
Pages: 1 2
Prev: What's ^$ mean?
Next: flock/fcntl