[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Another replace regexp with list question
From: |
Peter Dyballa |
Subject: |
Re: Another replace regexp with list question |
Date: |
Mon, 10 Jun 2013 12:30:29 +0200 |
Am 10.06.2013 um 03:03 schrieb Leandro Marcolino:
> This time I am trying to find occurrences of:
>
> "<span style='color:white'>私私私私</span>", but
> the number of 私 can change from 1 to many.
(replace-regexp "\\(<span style='color:white'>[ౡ]+\\)私\\(
*</span>\\)" "\\1 \\2")
In N-1 steps convert the last occurrence of "私" in a series of
"私" to SPACE and bear in mind that the next time your regexp would need
to have a SPACE before the final </span>.
The Nth step would be:
(replace-regexp "\\(<span style='color:white'>\\)私\\(
*</span>\\)" "\\1 \\2")
to convert the last left "私" to a SPACE.
--
Greetings
Pete
"A TRUE Klingon warrior does not comment his code."