I need to replace all accented char in a string by it's unaccented version, for sorting. I found how to match the accented ones, but is it possible to use a regex to replace each one? I mean:
var re = /ùÙüÜäàáëèéïìíöòóüùúÄÀÁËÈÉÏÌÍÖÒÓÜÚñÑ/g;
var str = "ùÙüÜäàáëèéïìíöòóüùúÄÀÁËÈÉÏÌÍÖÒÓÜÚñÑ";
var newstr = str.replace(re, 'M');
console.log(newstr);
this prints 'M' but I need :'uUuUaaaeeeiiiooouuuAAAEEEIIIOOOUUnN'
Is this possible? thanks