From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Mon, 31 Mar 2014 17:54:43 +0200 Message-ID: From: Daniel Peyrolon To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=047d7b86d8aceda19204f5e91103 Subject: Re: [9fans] Acme, Edit, code and newline Topicbox-Message-UUID: d3b1dce4-ead8-11e9-9d60-3106f5b1d025 --047d7b86d8aceda19204f5e91103 Content-Type: text/plain; charset=ISO-8859-1 > Edit , x/^[^ ]+[ ]*[^(]*\([^)]*\)[ ]*\{[ ]*\n/ s/[ ]*\{[ ]*\n/\n\{/g So, it was simply a matter of changing "$" for "\n" at the x command! How come my command didn't work? It really should work with the "$", shouldn't it? Or even without the \n or the $, since the regexp already matched until the '{', so the substitution should have worked. Also, thanks for pointing me that the '\' wasn't actually needed. Many thanks! 2014-03-31 17:36 GMT+02:00 Mark van Atten : > Edit , x/^[^ ]+[ ]*[^(]*\([^)]*\)[ ]*\{[ ]*\n/ s/[ ]*\{[ ]*\n/\n\{/g > > Mark. > > -- Daniel --047d7b86d8aceda19204f5e91103 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
> Edit , x/^[^ ]+[ ]*[^(]*\([^)]*\)[ ]*\{[ ]*\n/ s/[ ]*\{[ ]*\n/\n\{/g=

So, it was simply a matter of changing "$" for "\n" = at the x command!
How com= e my command didn't work?=A0
It really should work with the "= $", shouldn't it?
Or even without th= e \n or the $, since the regexp already matched until the '{',
so the substitution should have worke= d.

Also, thanks for pointing me that the '\' wasn't ac= tually needed.
Many thank= s!



2014-03-31 17:36 GMT+02:00 Mark van Atten <vanattenmark@gmail.com= >:
Edit , x/^[^ ]+[ ]*[^(]*\([^)]*\)[ ]*\{[ ]*\n/ s/[ ]*\{[ ]*\n/\n\{/g

Mark.




-- Daniel
--047d7b86d8aceda19204f5e91103--