From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: How to insert a string every 2 characters Date: Sat, 22 Aug 2015 16:45:44 +0200 Message-ID: <20150822144544.GA27850@tuxteam.de> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1440254769 13606 80.91.229.3 (22 Aug 2015 14:46:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Aug 2015 14:46:09 +0000 (UTC) Cc: Emacs Help To: Angus Comber Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 22 16:46:05 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZTA3X-000765-E6 for geh-help-gnu-emacs@m.gmane.org; Sat, 22 Aug 2015 16:46:03 +0200 Original-Received: from localhost ([::1]:46792 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTA3W-0004gF-Me for geh-help-gnu-emacs@m.gmane.org; Sat, 22 Aug 2015 10:46:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTA3J-0004SO-4i for help-gnu-emacs@gnu.org; Sat, 22 Aug 2015 10:45:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZTA3F-00014q-Vo for help-gnu-emacs@gnu.org; Sat, 22 Aug 2015 10:45:49 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:47186 helo=tomasium.tuxteam.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTA3F-00014i-Q0 for help-gnu-emacs@gnu.org; Sat, 22 Aug 2015 10:45:45 -0400 Original-Received: from tomas by tomasium.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1ZTA3E-0007dy-Uw; Sat, 22 Aug 2015 16:45:44 +0200 In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 5.199.139.25 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:106770 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sat, Aug 22, 2015 at 02:37:39PM +0100, Angus Comber wrote: > Hi > > If I have a string of characters like this: > > 0102030405 > > I want to transform into: > > 01 02 03 04 05 > > How do I do that? The short answer: query-replace-regexp RET .. RET .. (substitute the there by a real space, of course). The long answer: do you have many strings like that? Just one? How long are they? Do you have to do that very often? regards - -- tomás -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlXYixgACgkQBcgs9XrR2kYEFgCfaH9b0KrzKLtzhmnbZdFCcOcT cwUAn2IoQB2aFnp9EfA1YAdCMri57sED =npOb -----END PGP SIGNATURE-----