help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Word boundary with regular expression


From: fede (sent by Nabble.com)
Subject: Word boundary with regular expression
Date: Tue, 27 Sep 2005 05:11:35 -0700 (PDT)

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.
reply via email to

[Prev in Thread] Current Thread [Next in Thread]