all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

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.