Thread: Regex examples
View Single Post
Old 04-18-2014, 06:41 AM   #339
Skeeve
Zealot
Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.
 
Skeeve's Avatar
 
Posts: 142
Karma: 669192
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
Quote:
Originally Posted by roger64 View Post
Is this correct? I tried it, it finds nothing...
search=[^</a>]</sup>\s[^(et\s|de\s)]
replace=</sup>\u202F
No. It's wrong. [^</a>] means "Match one(!) character if t is not "<" and not "/" and not "a" and not ">". What you meant is the negative lookbehind
Code:
(?<!</a>)
Without testing (I can't run sigil on my computer), I'd assume that your regexp should be:
Code:
search=(?<!</a>)</sup>\s(?!(et|de)\s)
replace=</sup>\u202F
Skeeve is offline   Reply With Quote