Quote:
Originally Posted by famfam
I am trying to solve the problem of double words with Sigil:
|
In
Sigil, the following simple regular expression should find repeated words,
if they're separated by one or more spaces:
(*UCP)\b(\p{L}+)\s+\1\b
To replace them with a single word simply use
\1 as the replacement expression.
For example, this'll replace:
Code:
eine eine üble üble heiße heiße Soße Soße.
with
Code:
eine üble heiße Soße.
Obviously, the regular expression will not work if the duplicated word is wrapped in tags. For example:
Code:
eine <span>eine</span> üble <span>üble</span> heiße <span>heiße</span> Soße Soße.