EWhitley
Databricks Partner

For example, in Java regular expressions, the backslash character itself needs to be escaped with another backslash. So, if you want to replace a string with a backslash followed by the letter 'n', you need to use four backslashes in the replacement string: "\\n".

Just wanted to say thank you for posting that. I was struggling with the same thing today and didn't think to escape the backslashes. Fixed things completely.