[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs regex to transform text of field1\nfield2\n into field1\tfield
From: |
Angus Comber |
Subject: |
Re: emacs regex to transform text of field1\nfield2\n into field1\tfield2\n etc |
Date: |
Sat, 16 Feb 2019 11:51:05 +0000 |
I worked it out.
m-%
^\(.*\) Ctrl-Q newline \(.*\)
with
\1 <tab> \2
On Sat, 16 Feb 2019 at 11:23, Angus Comber <anguscomber@gmail.com> wrote:
> I have a text file of modem country codes like this:
>
> T.35 Code
> Country
> 00
> Japan
> 07
> Argentina
> 09
> Australia
> 0A
> Austria
>
>
> But I want to transform the buffer to look like this:
> T.35 Code Country
> 00 Japan
> 07 Argentina
> 09 Australia
> 0A Austria
>
> What regex would do that?
>
>