From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Angus Comber Newsgroups: gmane.emacs.help Subject: emacs regex to transform text of field1\nfield2\n into field1\tfield2\n etc Date: Sat, 16 Feb 2019 11:23:57 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="116880"; mail-complaints-to="usenet@blaine.gmane.org" To: Emacs Help Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Feb 16 12:26:32 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1guy75-000UFT-ST for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Feb 2019 12:26:31 +0100 Original-Received: from localhost ([127.0.0.1]:54820 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guy74-0000n6-Rn for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Feb 2019 06:26:30 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guy6q-0000mb-6z for help-gnu-emacs@gnu.org; Sat, 16 Feb 2019 06:26:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1guy6l-0000At-9c for help-gnu-emacs@gnu.org; Sat, 16 Feb 2019 06:26:13 -0500 Original-Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]:44449) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1guy6h-0008W0-NH for help-gnu-emacs@gnu.org; Sat, 16 Feb 2019 06:26:09 -0500 Original-Received: by mail-pl1-x62c.google.com with SMTP id c4so1245706pls.11 for ; Sat, 16 Feb 2019 03:25:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=fm1zTvDw56PZQL0EyzUjjjfJf9/u/aya4pLJpTLpXJU=; b=LREnMXGLupnIsxTaO0aZB+xczdJERreqdD+cP97iAXt+4JUHW242orgk+bjF5V0veq ILw03dN7a90K8wvhgVXCBmu4p0QiCNRIQddJBcFjI7xK+j1GbQ3N/Zhr2cg+BUA1lczA GFkhpQhmk/V40eGnsv2tGVCgTKTgaHwgqYytZeFvA9qYCFHOM4bzYMRkf9HhwAD9zns3 akFCYAJwqVHY5QH3exVCn6kvzKfuzQGTdheUxJO/90nfUVYNdzNpchUJvGzqVowRDSZq zxNzyxmStZVFJP9Zd9Xcp/qqmmjadmY1pmhsJhyA4kC69o60tNXXbtZ4/mHWsWAtC3hz uEBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=fm1zTvDw56PZQL0EyzUjjjfJf9/u/aya4pLJpTLpXJU=; b=rnnlOb4Tq/ttimi9a5zPXWJubl1DPfbw4qDMGBEnYICW/E2upQ/6lvB7xpiDQCzd4h cFdrZBl6b87DT/kxkEclVRfkR0T3O+VCP31PachX0QEhxy+b2zqjG6tGxa/PPudyHYNN pGd8lkYWXTMtzODbd92g2E0qlEWAkDP9TOyRt6Jz3fd/KGjyAL0vhgnuBZQfH8U0f538 mxbfLxHQpTkWv1tRkEU+yIDXH07m6PNSlAEZpF9QkgczpRFBb3eLqaPlIK39f6djHoRW uqLAw8kU2ZeKtG/JpMmFy9MqvRcxJtgV/uqpg2QVbx3N8NHd4DMJUwL8bi2OYdm2WYFK Bg6Q== X-Gm-Message-State: AHQUAuZ13Jczr87JjhFcuoc85/Me4Jgn6ZF5An4OU82HrkpZH5NHUAJu 07NxUIje+OhmJWfJfIG9ugTh/wVY5bZgaH3m52J3Tzvo X-Google-Smtp-Source: AHgI3IbRwDO5xOpxnVW77BU2XK/ulXZSRUjNYwRbW+lqIiSHST/OzOWIVe7qbkB3+fXQL0Ta64ezcrLKDBqrCo6ogu8= X-Received: by 2002:a17:902:7246:: with SMTP id c6mr14691756pll.68.1550316357736; Sat, 16 Feb 2019 03:25:57 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::62c X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:119430 Archived-At: 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?