[erlang-questions] RegExp Behaviour

Gordon Guthrie gordon@REDACTED
Sat Apr 18 11:49:19 CEST 2009


Folks
This looks like a bug to me, but after many years regexp still gives me the
creeps :(

> regexp:gsub("abcde", "c", "x").
{ok, "abxde", 1}

One substitution, new string, tickety-boo!

> regexp:gsub("ab:de", ":", "&").
{ok, "ab:de", 1}

One substitution, but the old string, erk?

Gordon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090418/9a6733ad/attachment.htm>


More information about the erlang-questions mailing list