help-gnu-emacs
[Top][All Lists]
Advanced

[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'>&#31169;&#31169;&#31169;&#31169;</span>", but
> the number of &#31169; can change from 1 to many.
>
> And I want to replace each &#31169; of the list to a white space (besides
> removing the <span> clause). So, if there were x "&#31169;", I need x " ".

Replace: \(<span style='color:white'>\)\(\(?:&#31169;\)+\)\(</span>\)
With:    \1\,(make-string (/ (length \2) 8) ? )\3


reply via email to

[Prev in Thread] Current Thread [Next in Thread]