germanphonetic
germanphonetic copied to clipboard
function changeUnnecessary might be wrong
I don't speak German, but changeUnnecessary might be wrong
text = original.replace(regex1[i], regex2[i])
you see, you iterate over array regex1 and regex2, I think you mean to replace all characters in regex1 to with its counterpart in regex2, then the following code may produce the expected result:
text = text.replace(regex1[i], regex2[i])