bad arg error with re:replace

Wes James comptekki@REDACTED
Wed Jul 21 23:49:32 CEST 2010


I figured it out:

T.
"test\\"
13> re:replace(T,"\\\\","\\\\\\",[{return,list}]).
"test\\\\"

On Wed, Jul 21, 2010 at 3:11 PM, Wes James <comptekki@REDACTED> wrote:
> I am trying to do this:
>
> re:replace("test\\","\\","\\\\",[{return,list}])
>
> but I'm getting a bad arg error.  This is assuming  for each "\" I
> need "\\" from here:
>
> http://www.erlang.org/doc/man/re.html#replace-4
>
> I'm trying to replace each "\" with "\\".
>
> thx,
>
> -wes
>


More information about the erlang-questions mailing list