use 5.020; use strict; use utf8; sub explain_chars { use charnames (); return join "\n", map { charnames::viacode(ord $_) } @_; } my $name = 'Gašper Šantl'; # no, that's not actually *my* name. my $regex = qr/[^0-9a-z @\.,_#+±%()\[\]\$\-~¿!'&§°¨ßäöüÅÄÁÀÃÂÖÜÚÉÈÑþœçáàåãâëéèêòóúùîïí©øØô½ñšŠý®¬µ¯]/; my (@matches) = $name =~ /$regex/g; say explain_chars(@matches);