regexp:(g)sub buglet?

Timur Irmatov <>
Tue Nov 29 11:03:18 CET 2005


On 11/29/05, Bengt Kleberg <> wrote:
> On 2005-11-29 01:18, Hal Snyder wrote:
>
> > 3> regexp:gsub("foo","$","Z").
> > {ok,"foo",0}
>
> before sam (http://plan9.bell-labs.com/sys/doc/sam/sam.html, first use
> of strucural regular expressions) most (all?) regular expressions used
> '\n' as end of string. try:
>
> regexp:gsub("foo\n","$","Z").

perl and python behave differently:

perl -e '$a="foo"; $a =~ s/$/Z/; print "$a\n"'

prints fooZ.


--
Timur Irmatov, xmpp:



More information about the erlang-questions mailing list