I’m trying to replace:
á, ă, â ... with a
í, ì, ĭ, î, ǐ, ï, ḯ ... with i
ú, ü ... with u
And so on.
What I am doing now is this: str.replace(/[íìĭîǐïḯ]/gi,'i'.
Also, if I want to match all of them I need to call replace for each grouping.
Is there a better way of doing this?
As far as I know you have to match each group. Take a look into this example, although it is javascript it’s very complete script and easy to get it to work in actionscript:
http://lehelk.com/2011/05/06/script-to-remove-diacritics/