unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Trouble with regexp
@ 2005-10-25 16:24 exits funnel
  0 siblings, 0 replies; 10+ messages in thread
From: exits funnel @ 2005-10-25 16:24 UTC (permalink / raw)


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

  


		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

^ permalink raw reply	[flat|nested] 10+ messages in thread
[parent not found: <mailman.12639.1130257485.20277.help-gnu-emacs@gnu.org>]
* Trouble with regexp
@ 2008-05-22 16:00 TheLonelyStar
  2008-05-22 16:47 ` Alan Mackenzie
  0 siblings, 1 reply; 10+ messages in thread
From: TheLonelyStar @ 2008-05-22 16:00 UTC (permalink / raw)
  To: Help-gnu-emacs


Hi,

I some trouble with regular expression. I thought, the regexp "\(foo\|bar\)"
should match either foo and bar.
But  if I have a buffer with "foo" in it, the regexp build does not match it
with that :(.

Thanks!
Nathan
-- 
View this message in context: http://www.nabble.com/Trouble-with-regexp-tp17407478p17407478.html
Sent from the Emacs - Help mailing list archive at Nabble.com.





^ permalink raw reply	[flat|nested] 10+ messages in thread
[parent not found: <mailman.12018.1211472045.18990.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2008-05-22 17:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-25 16:24 Trouble with regexp exits funnel
     [not found] <mailman.12639.1130257485.20277.help-gnu-emacs@gnu.org>
2005-10-25 17:16 ` rgb
2005-10-25 17:38   ` exits funnel
2005-10-25 17:54   ` Pascal Bourguignon
2005-10-25 18:40     ` exits funnel
2005-10-25 17:17 ` Chris McMahan
  -- strict thread matches above, loose matches on Subject: below --
2008-05-22 16:00 TheLonelyStar
2008-05-22 16:47 ` Alan Mackenzie
2008-05-22 17:27   ` Joel J. Adamson
     [not found] <mailman.12018.1211472045.18990.help-gnu-emacs@gnu.org>
2008-05-22 16:31 ` David Kastrup

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).