Can anyone help me with a javascript regular expression that I can use to compare strings that are the same, taking into acccount their non-Umlaut-ed versions.
for e
something like
tr = {"ä":"ae", "ü":"ue", "ö":"oe", "ß":"ss" }
replaceUmlauts = function(s) {
return s.replace(/[äöüß]/g, function($0) { return tr[$0] })
}
compare = function(a, b) {
return replaceUmlauts(a) == replaceUmlauts(b)
}
alert(compare("grüße", "gruesse"))
you can easily extends this by adding more entries to "tr"
not quite elegant, but works