[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Another replace regexp with list question
From: |
Sean McAfee |
Subject: |
Re: Another replace regexp with list question |
Date: |
Tue, 11 Jun 2013 11:23:44 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) |
Leandro Marcolino <leandromarcolino@gmail.com> writes:
> This time I am trying to find occurrences of:
>
> "<span style='color:white'>私私私私</span>", but
> the number of 私 can change from 1 to many.
>
> And I want to replace each 私 of the list to a white space (besides
> removing the <span> clause). So, if there were x "私", I need x " ".
Replace: \(<span style='color:white'>\)\(\(?:私\)+\)\(</span>\)
With: \1\,(make-string (/ (length \2) 8) ? )\3