From: "fede (sent by Nabble.com)" <lists@nabble.com>
Subject: Word boundary with regular expression
Date: Tue, 27 Sep 2005 05:11:35 -0700 (PDT) [thread overview]
Message-ID: <970191.post@talk.nabble.com> (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
next reply other threads:[~2005-09-27 12:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-27 12:11 fede (sent by Nabble.com) [this message]
[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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=970191.post@talk.nabble.com \
--to=lists@nabble.com \
--cc=fede.v@libero.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.