|
Prev: What's ^$ mean?
Next: flock/fcntl
From: nicolas_laurent545 on 5 Jul 2006 08:25 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 5 Jul 2006 08:31 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 5 Jul 2006 08:38 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 5 Jul 2006 08:57 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 5 Jul 2006 09:29
<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 |