View Single Post
Old 10-23-2014, 09:02 PM   #4
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
lookarounds do not advance the search very rudimentary mistake, sorry. (lookarounds are very fun to me but they also bend my head in knots.)

And this could be done a different way... if only lookbehind allowed variable-length strings. Fortunately, you can use the curly-bracket repeater for a finite variable-length string, but only in http://calibre-ebook.com's editor.

Code:
(?<=>[^<]{,99999})[a-zA-Z]\.[a-zA-Z]
Sigil doesn't use python's regex engine, so this doesn't work.

In Sigil, you can use:
Code:
(>[^<]*?)[a-zA-Z]\.[a-zA-Z]
And it will also capture the part from the preceding tag. However, it is captured and you can replace with "\1" followed by the replacement for the "x.y".
eschwartz is offline   Reply With Quote