01-03-2013, 10:57 AM | #1 |
Grand Sorcerer
Posts: 5,635
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
Case-sensitive search in Regex mode?
I noticed that Sigil 6.2 won't find a capitalized word if Regex mode is selected.
For example, if I search for "test" it wont find "Test" in this example paragraph: <p>This is a Test.</p> However, it'll find "Test" if I switch to Normal mode. I wondering whether this is by design or a bug, because the Editors with PCRE engines that I've seen so far all default to case-insensitive searches in Regex mode. |
01-03-2013, 11:33 AM | #2 |
Well trained by Cats
Posts: 30,378
Karma: 58053698
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
start with (?i) <- case insensitive
but you are discussing what should be the default, right |
Advert | |
|
01-03-2013, 11:37 AM | #3 |
Grand Sorcerer
Posts: 27,903
Karma: 198500000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I don't know. It seems to me that regex, by design, is case insensitive. That's why you have to add flags/switches to force it to be case insensitive. Almost all apps I use that have some sort of regex engine put the onus on the user to specify they want case insensitivity. Non-regex search engines always seem to default to case insensitive though.
|
01-03-2013, 11:53 AM | #4 |
Grand Sorcerer
Posts: 5,635
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
(?i) indeed works fine.
Yes. That was my assumption, too. But then again, I'm not exactly a regex guru. |
01-03-2013, 12:17 PM | #5 |
frumious Bandersnatch
Posts: 7,533
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
|
Advert | |
|
01-03-2013, 01:20 PM | #6 | |
Grand Sorcerer
Posts: 27,903
Karma: 198500000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
That's what I'm used to as default. |
|
01-04-2013, 06:44 AM | #7 |
Wizard
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
well when using the "replace" part of regex, you want some control over the case used in the replacement strings - so case sensitive is surely a sensible default
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Case Sensitive Regular Expression | silentguy | Calibre | 5 | 05-11-2015 05:56 AM |
Debug commands not case sensitive | jmseight | Kindle Developer's Corner | 0 | 04-03-2012 11:11 PM |
Library on Case-Sensitive file system on OS X | lbutlr | Calibre | 13 | 11-04-2011 01:20 PM |
K3 search case sensitive only? | charonme | Amazon Kindle | 1 | 01-28-2011 05:15 PM |
tags / series case sensitive sort | zelda_pinwheel | Calibre | 11 | 05-10-2009 01:38 PM |