View Single Post
Old 04-08-2018, 01:44 PM   #1
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 1,033
Karma: 2006208
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
RegEx: anchor problem in editor

I have an anchoring problem on using regex in the calibre editor.
Say, I want to place an anchor between two succeeding M's, in which between those M's:
  • there is no space
  • there are 1 or more spaces

For that I'm using the regex given in attachment 1 (and its explanation is given in attachment 2).

As can be seen in the test string, 3 anchor locations should (and are) found in a simulator as I expected them to be.

However, when using the regex in the calibre editor, the very first one is never found (=when no separating spaces are present). Apparently, the calibre regex engine works different. So, how to make it work for the calibre regex engine? Any ideas?
Attached Thumbnails
Click image for larger version

Name:	calibre1.jpg
Views:	466
Size:	12.5 KB
ID:	163323   Click image for larger version

Name:	calibre2.jpg
Views:	459
Size:	55.6 KB
ID:	163324  
DrChiper is offline   Reply With Quote