From: Gary Wessle <phddas@yahoo.com>
Subject: regex search and replace
Date: 23 Oct 2006 07:12:36 +1000 [thread overview]
Message-ID: <m3y7r8jbqz.fsf@localhost.localdomain> (raw)
Hi
I am using GNU emacs 21.4.1 and wanting to use regex to do the
following.
I have few lines in the format
-rw-r--r-- 1 fred fred 56823 Oct 14 01:32 samcar
...
-rw-r--r-- 1 fred fred 56823 Oct 14 01:32 manham
I want to end up with
{ "sam/car", ..., "man/ham" }
so my step by step approach is to remove the
" -rw-r--r-- 1 fred fred 56823 Oct 14 01:32 "
then to change aaabbb with aaa/bbb.
then to replace end of line with (", ")
and maybe by then I will learn enough to finish the task.
so, playing around with incremental regex search and hoping some body
will help me to learn something mean while.
thanks
next reply other threads:[~2006-10-22 21:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-22 21:12 Gary Wessle [this message]
2006-10-22 21:45 ` regex search and replace Gary Wessle
2006-10-22 23:24 ` Peter Dyballa
2006-10-24 15:37 ` rgb
2006-10-22 22:08 ` Alexis Roda
2006-10-23 13:29 ` aartist
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=m3y7r8jbqz.fsf@localhost.localdomain \
--to=phddas@yahoo.com \
/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.