Thread: Regex examples
View Single Post
Old 08-08-2014, 03:18 PM   #383
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,803
Karma: 206879174
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by eschwartz View Post
On which note, we really need calibre editor macros already, since calibre doesn't seem to support the full PCRE.
It supports a whole big bunch of it. Anything missing is mainly on the replacement side of things--like the (upper|lower)case thing (which--lets face it--is pretty specialized/gimmicky to begin with). The calibre editor's regex engine also gains us a few things that other regex flavors don't have, like variable length lookbehinds and the short-hand classes \m \M (which match the beginning and end of words respectively), as opposed to just the \b (word boundary).

The only thing I REALLY miss in calibre's regex ATM is the \K functionality. I'm not entirely sure why it's unavailable--since it's certainly part of the Barnett Python regex module that it's employing for its editor's S&R.
DiapDealer is offline   Reply With Quote