[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: "C-a" the first character in each line?
From: |
Drew Adams |
Subject: |
RE: "C-a" the first character in each line? |
Date: |
Sun, 24 Jun 2007 07:14:01 -0700 |
> (while (search-forward-regexp "^\\(.\\)" nil t)
> (replace-match "\% \1"))
>
> laa
> moo
> nii
> -----------------
>
> I expected
>
> %
> % laa
> % moo
> % nii
>
> but isnstead I get
>
> % ^A
> % ^Aaa
> % ^Aoo
> % ^Aii
>
> where ^A stands for the character "C-a".
>
> What am I missing?
^A is octal 1. You need \\1, not \1.