Regex for replacing diacritics

Hi,
As ConvertAPI webhook have problems with parsing file names with diacritic characters (ó, ą etc.) I want to replace those with their non-diacritic equivalent (o, a etc.).
Regex for finding those characters is apparently simple:
[À-ž]
but I have trouble creating pattern for replacement that works.

Of course, I could create n-times nested replace(replace(replace(replace(mytext,ó;o);ą;a)ń;n);Ś;S) etc. and make this “hardcoded” but I’m looking for more elegant solution.

Many thanks

You can use ascii function for this,

{{ascii(" ê - circumflex"; true)}}

Screenshot from 2023-06-27 20-56-37

Not sure, if it works for all the diacritic though.

Interestingly it works for all Polish diacritics, except “ł”.
So {{ascii(replace(2.text; “ł”; “l”); “true”)}} would cover all lower characters.

Many thanks!

2 Likes