unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Word boundary with regular expression
@ 2005-09-27 12:11 fede (sent by Nabble.com)
  0 siblings, 0 replies; 5+ messages in thread
From: fede (sent by Nabble.com) @ 2005-09-27 12:11 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 596 bytes --]


Hi!

I have the following problem: I'm programming in C language and I'd like
to substitute every occurence of "my_type" with "another_type". So I'd like
"my_type *mine;" to become "another_type *mine;" and so on, but NOT
"my_type_2 *mine;" to become "another_type_2 *mine;"! I've tried the following:

(query-replace-regexp "\\bmy_type\\b" "another_type" nil nil nil)

but the problem is that \b seems to include words terminating with '_'...
any idea?

Thanks!
--
Sent from the Emacs - Help forum at Nabble.com:
http://www.nabble.com/Word-boundary-with-regular-expression-t350272.html#a970191

[-- Attachment #1.2: Type: text/html, Size: 769 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-10-07  1:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.8819.1127823405.20277.help-gnu-emacs@gnu.org>
2005-09-27 13:13 ` Word boundary with regular expression Anselm Helbig
2005-09-27 15:25   ` Johan Bockgård
2005-09-28  6:48   ` fede (sent by Nabble.com)
2005-10-07  1:05     ` Ian Zimmerman
2005-09-27 12:11 fede (sent by Nabble.com)

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).