in reply to Re: Normalizing diacritics in (regex) search
in thread Normalizing diacritics in (regex) search

actually I stumbled over this code from Brian d Foy, it shows a (well actually two) ways to parse the name the keyword \bWITH\b

use utf8; use v5.32; use open qw(:std :utf8); no warnings qw(experimental::uniprop_wildcards); use charnames qw(); my @letters = qw(a à á â ã ä å); foreach my $letter ( @letters ) { my $name = charnames::viacode( ord $letter ); say "$letter ($name):", $letter =~ m<\p{Name=/\bWITH\b/}> ? 'Matched' : 'Missed'; }

In the next step I want to speed this up by preparing the mapping list for all latin characters beforehand, like this I can use simple character classes in the regexes.

I was expecting to find a custom function which gives me these equivalent characters right away, probably prop_invmap of Unicode::UCD can be used for this.

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery