View Single Post
Old 10-10-2013, 12:04 PM   #24
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,435
Karma: 27757438
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
There is no need to use the regex engine from scintilla, you can use any regex engine you like, provided scintilla has a way of highlighting matched text and scrolling to the highlights. All it costs is some memory to copy the editor buffer and run the regex on the copy and then update the buffer with the matches.

EDIT: In fact whatever editor component is used, I highly doubt we will rely on its regex engine, since there needs to be the ability to run regexes on all the files in the book and the regex engine for that must be the same as that used in the editor.

In fact the scintilla documentation even has a section on doing just that: http://www.scintilla.org/ScintillaDoc.html#Searching

Last edited by kovidgoyal; 10-10-2013 at 12:22 PM.
kovidgoyal is offline