Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 02-22-2014, 08:59 AM   #1
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: 8,767
Karma: 39536849
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Regex search details

I see that unicode characters can be found using the \uFFFF format (was \x{FFFF} coming from Sigil's PCRE), and at least some of the unicode categories work (I can find any letter in any language using \p{L} or \p{Letter}), but many of those unicode categories don't seem to have the granularity I'm accustomed to.

The bulk of the punctuation searches seems to work:
\p{P} all punctuation
\p{Pd} dashes
\p{Pi} opening quotes
\p{Pf} closing quotes
etc...

But \p{Ll} and \p{Lu} (or \p{Lowercase_Letter}, \p{Uppercase_Letter}) both seem to find all letters regardless of case--just like \p{L}.

Is this expected/known behavior?

EDIT: Ooops! Never really expected those classes to be subject to the case-sensitive check-box. My bad. Nothing to see here!

Last edited by DiapDealer; 02-22-2014 at 09:05 AM.
DiapDealer is offline   Reply With Quote
Old 02-22-2014, 09:34 AM   #2
mrmikel
Book Twiddler
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 1,933
Karma: 1405001
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
That may explain some seemingly inconsistent behavior I have noted from time to time and just assumed it was because calibre's regex differed from PCRE in that case!
mrmikel is offline   Reply With Quote
 
Enthusiast
Old 02-22-2014, 10:10 AM   #3
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: 8,767
Karma: 39536849
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
What is the regex engine being used here, out of curiosity? Is it Matthew Barnett's Python regex module (hope, hope, hope)?
DiapDealer is offline   Reply With Quote
Old 02-22-2014, 11:38 AM   #4
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: 25,425
Karma: 4961459
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yes, it is, and it was your mention of it in the original sigil thread that got me looking into using it. It had a couple of bugs that I helped find/fix, but otherwise it's been great.
kovidgoyal is online now   Reply With Quote
Old 02-22-2014, 11:58 AM   #5
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: 8,767
Karma: 39536849
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Cool. Glad it's working out. I'm a big fan of it.

Variable-width lookbehinds (in addition to the robust unicode support) just tickles me pink!
DiapDealer is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
search/replace multiline regex Alt68er Sigil 4 02-01-2014 09:40 AM
Regex search and replace dwlamb Sigil 6 04-12-2013 02:34 PM
regex search/replace Sharlene Sigil 10 01-28-2012 04:14 AM
need regex help search and replace schuster Calibre 4 01-10-2011 09:00 AM
regex search for roman numerals Blurr Calibre 2 12-16-2009 05:55 PM


All times are GMT -4. The time now is 05:41 AM.


MobileRead.com is a privately owned, operated and funded community.