View Single Post
Old 01-06-2012, 08:06 AM   #28
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,487
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Quote:
Originally Posted by meme View Post
And in case its missed, this post details an issue with F&R not finding text - https://www.mobileread.com/forums/sho...36&postcount=9
It doesn't match from your cursor location. It matches from the beginning of the text. So since (?s)Stoker.*?Release matches from line 9 to 31 that is the only match.

The .*Release also has the same issue because it starts matching a the beginning of the line so if your cursor is at the start of class then you're already past the start point for the match.

So what this really comes down to is how to determine what a match is. I'm looking at the entire document beginning to end right now. Would it be better to do a forward and then backward search from the cursor position?

The reason I went with a beginning to end search is you will always get the same count no matter where you are in the document. Going by cursor position (as shown with this example) you will get different matching results depending on where your cursor is due to the nature of regex's including or not including text.
user_none is offline