[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Complete match and replace on a word
From: |
wilnerthomas |
Subject: |
Complete match and replace on a word |
Date: |
Sun, 21 Aug 2022 00:49:51 +0200 (CEST) |
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?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Complete match and replace on a word,
wilnerthomas <=