[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
regex search and replace
From: |
Gary Wessle |
Subject: |
regex search and replace |
Date: |
23 Oct 2006 07:12:36 +1000 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
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
- regex search and replace,
Gary Wessle <=