[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Trouble with regexp
From: |
Chris McMahan |
Subject: |
Re: Trouble with regexp |
Date: |
Tue, 25 Oct 2005 13:17:44 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt) |
I would recommend that you use a macro instead of a regexp, if for no
other reason than I don't know the regexp to use :)
exits funnel <exitsfunnel@yahoo.com> writes:
> Hello,
>
> I have a text file with hundres of lines of the form:
>
> %token FOO_Alter
>
> where 'FOO' is always 'FOO' but 'Alter' is variable.
> I'd like to convert these lines to:
>
> t_foo_Alter = 'Alter';
>
> using query-replace-regexp but I can't quite get it
> right. Here's what I have so far:
>
> M-x query-replace-regexp RET
> %token XTAG_\(a-Z\) RET
> t_xtag_\1 = '\1'; RET
>
> Sadly, I get 0 occurences replaced. Can anyone set me
> straight? Thanks in advance.
>
> -exits
--
(. .)
=ooO=(_)=Ooo=====================================
Chris McMahan | first_initiallastname@one.dot.net
=================================================