[erlang-questions] question about regexp:gsub \&

yin sun sunyin51@REDACTED
Sun Jul 15 00:48:12 CEST 2007


after checking the source, I realized that I should use "\\&" instead of "\&".
this should be put in manual, not straight forward to me.

On 7/14/07, yin sun <sunyin51@REDACTED> wrote:
> in http://www.erlang.org//doc/apps/stdlib/index.html
> manual for regexp,
> \& puts a literal & into the replacement string.
>
> But
>
> 35> regexp:gsub("<>",">","\&").
> {ok,"<>",1}
>
> Is the manual wrong or I miss something?
>
> Thanks
> /Yin
>



More information about the erlang-questions mailing list