View Single Post
Old 02-02-2014, 01:39 AM   #1
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)
regex cannot find to replace

Quote:
calibre, version 1.22.0
ERROR: Cannot replace: Currently selected text does not match the search query. You must first click Find, before trying to replace
I get this message after searching for
Code:
<p([^<>]*)>*(?=[^<])
It successfully matches the beginning of this paragraph:
Quote:
<p>*Drummond considered this, realized that it was not particularly reassuring, but decided not to pursue it. “Assuming you do become my vice president, sir, I expect you have some ideas for how to handle this whole Event business? You are, after all, obviously a magical person yourself. What will you propose? Full disclosure of the wizard community? Equality between our worlds? Peaceful integration of our different cultures?”</p>
(Both asterisks in red should be unicode nbsp, but I guess the editor doesn't let pasting it?)

So after clicking Find, it matches the text, then when I click Replace it claims the text it selected doesn't match???

This doesn't happen when I don't use the lookahead.

EDIT: Of course I did work around this by just grabbing the match instead of using lookahead for it, then replacing with \2

Last edited by eschwartz; 02-02-2014 at 01:43 AM.
eschwartz is offline   Reply With Quote