Thanks a lot ...
I tried to adapt your proposal for non ascii characters:If I take care of utf8 in my script and in the I/O withsub translate_Eily { my $name = shift; $name =~ s/ \P{isLetter}+ # Non letter chars | # or (?<= \p{isLetter} ) # Something that comes after a + letter (?= \p{isUpper} ) # and comes before an upperc +ase letter / /xg; # \u is short for ucfirst and \L for lc $name =~ s/(\w+)/\u\L$1/g; return $name; }
use utf8; use open OUT => ':encoding(utf8)'; use open ':std';
It works.
François
In reply to Re^2: regex: help for improvement
by frazap
in thread regex: help for improvement
by frazap
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |