unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Complete match and replace on a word
@ 2022-08-20 22:49 wilnerthomas--- via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; only message in thread
From: wilnerthomas--- via Users list for the GNU Emacs text editor @ 2022-08-20 22:49 UTC (permalink / raw)
  To: Help Gnu Emacs

I am using the following expression to change "Meter" or "Meter" to "Me".  
And to change "Metri" and "metri" to "Me".

(s-replace-regexp "\\<\\([Mm]eter\\|[Mm]etri\\)" "Me" "Metermetri")

But executing the expression gives only "Memetri" rather than "Meme".

The string regexp in therefore wrong, as it does not achieve replacements on all
matches.

What kind of regexp is required to perform a complete match and replace?



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-20 22:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-20 22:49 Complete match and replace on a word wilnerthomas--- via Users list for the GNU Emacs text editor

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