Regex how to replace \r\n with an actual newline in string

regex

Solution

`\` is an escape character in regex and can be used to escape itself, meaning that you can write `\\n` to match the text `\n`.

Use the pattern `\\r\\n` and replace with `\r\n`.

Problem

Because \r\n are "special" chars in a regex I have a problem identifying what I actually need to put in my expression. basically i have a string that looks something like ... ``` bla\r\nbla\r\nbla ``` .. and i'm looking to change it to ... ``` bla bla bla ``` ... using a regular expression. Any ideas?

Original source