[erlang-questions] Stripping slashes from a string

Sergei Golovan <>
Fri Apr 27 09:24:54 CEST 2012

On Fri, Apr 27, 2012 at 11:19 AM, Martin Dimitrov
<> wrote:
> With 6 it produces double backslashes making the result equivalent to
> the initial text:

True, I oversaw that the replacing regexp was incorrect too (also, the
string itself).

1> re:replace("\\\\r \\\\n text", "\\\\\\\\(r|n)", "\\\\\\1",
[{return,list}, global, unicode]).
"\\r \\n text"

works fine.

Sergei Golovan

More information about the erlang-questions mailing list