View Single Post
Old 02-23-2012, 05:03 AM   #2
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 4,988
Karma: 802238
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by silentguy View Post
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.
Can you point at where this is said? It should be fixed, but a quick google search does not find where you are referring to.
Quote:
Sadly python does not allow activating case sensitivity in a regexp, i.e. (?-i) does not work.
This isn't python not working. Calibre sets the ignore case flag parameter on the call to re, which overrides any flags in the regexp.
Quote:
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.
This has been discussed before. Allowing case sensitive would require changing to case sensitive or doing something very strange with embedded flags. The first won't happen, and working on the second one (and dealing with the fallout) isn't something that interests me. Perhaps you could take it on.
chaley is offline   Reply With Quote