View Single Post
Old 02-22-2012, 12:39 PM   #1
silentguy
Connoisseur
silentguy doesn't littersilentguy doesn't littersilentguy doesn't litter
 
Posts: 88
Karma: 200
Join Date: Nov 2010
Location: Dortmund, Germany
Device: Kindle Paperwhite (10. Generation)
Case Sensitive Regular Expression

Hi!
the manual stated that regular expressions in calibre are treated as case sensitive, but i noticed a few cases where this is not true. e.g. the re() function and the search.

Sadly python does not allow activating case sensitivity in a regexp, i.e. (?-i) does not work.

I'm mentioning this for two reasons. 1) Maybe the manual should be updated to reflect those changes and 2) it would be nice to somehow use case sensitive regexp. For templates I created my own function to do so, for searching it seems impossible. the search field does not even let me enter the same query with a different case. I know most of the time it's not needed but it would have been useful to me right now so I thought I'd mention it.
silentguy is offline   Reply With Quote