all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: <tomas@tuxteam.de>
To: Angus Comber <anguscomber@gmail.com>
Cc: Emacs Help <help-gnu-emacs@gnu.org>
Subject: Re: How to insert a string every 2 characters
Date: Sat, 22 Aug 2015 16:45:44 +0200	[thread overview]
Message-ID: <20150822144544.GA27850@tuxteam.de> (raw)
In-Reply-To: <CAAtGUhWNy8J2cKOEjkdCq_3Q2YG3nLZUcCuxXn9aqiDszT-FsQ@mail.gmail.com>

-----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 ..<SPACE>
(substitute the <SPACE> 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-----



  reply	other threads:[~2015-08-22 14:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-22 13:37 How to insert a string every 2 characters Angus Comber
2015-08-22 14:45 ` tomas [this message]
2015-08-22 14:58   ` Angus Comber
2015-08-22 17:03     ` tomas
2015-08-23 21:48   ` Emanuel Berg
2015-08-23 21:43 ` Emanuel Berg
2015-08-24 15:12 ` Nicolas Richard
2015-08-24 20:09   ` Emanuel Berg
2015-08-25  9:16     ` Nicolas Richard
2015-08-25 20:39       ` Emanuel Berg
2015-08-26 10:55         ` Nicolas Richard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150822144544.GA27850@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=anguscomber@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.