I have a function for replacing strings
function replaceLetters(str) {
return str.replace('a\\\a', "!")
}
replaceLetters('a\a a\\a a\\\a')
As a result I get string like "aa ! a\a" but I need string like "a\a a\a !"
Can you please help me with this task?