my $translation_table = { 'A' => 'A', # translate from => to 'a' => 'a', 'r' => 'r', # etc }; my $str = "Barra O Gri obhtha"; # build search pattern as 'pattern1|pattern2|...' my $patterns = join '|', keys %$translation_table; $str =~ s/($patterns)/$translation_table->{$1}/ge;
In reply to Re: Orthography Translation using Regex
by Roger
in thread Orthography Translation using Regex
by Baz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |