[erlang-questions] adding slashes for special chars

Andrey Shnayder <>
Wed Jun 25 12:47:08 CEST 2008

Hi, Erlang team.
I want to add slashes before some characters in a string - single quote,
double quote, backslash.
I have not found any function that implement this, therefore I use
regexp:gsub function, but I have a trouble with backslashes:

*69> regexp:gsub("qwert\\asdf", "\\", "\\\\").

May you help me, please?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080625/53904052/attachment.html>

More information about the erlang-questions mailing list