in reply to Match full utf-8 characters
This is a workaround but should remove all non 255-ASCII characters:
use strict; use warnings; use utf8; my $str = 'a…b'; $str =~ s/(.)/ord($1)<256?$1:''/ge; print "$str\n";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Match full utf-8 characters
by Allasso (Monk) on Apr 29, 2019 at 13:40 UTC |
In Section
Seekers of Perl Wisdom