An operation is case insensitive when uppercase and lowercase characters are equally treated.
Questions tagged [case-insensitive]
1146 questions
18
votes
6 answers
How to change MySQL table names in Linux server to be case insensitive?
I'm working on an old website that used to be hosted on an Apple server. When it was migrated into a new Linux server it stopped working. I'm pretty sure it's because all the MySQL queries used in the php scripts have different case combinations for…

rocklandcitizen
- 979
- 4
- 17
- 27
17
votes
4 answers
Using Hashtables/Dictionaries with string keys & Case Insensitive Searching
Wondering if this is possible.
We have an 3rd Party library that contains identification information about users...
The main interaction with the library is through a HashTable which is keyed with a string, and returns an Object Graph of information…

Eoin Campbell
- 43,500
- 17
- 101
- 157
17
votes
3 answers
MySQL case-insensitive DISTINCT
Can anyone tell me how i can SELECT DISTINCT from my database without it being case-sensitive?
My query is
SELECT DISTINCT email FROM `jm_order`
The results brings out all the emails in the table but repeats the ones with different cases. This is…

Raymond Ativie
- 1,747
- 2
- 26
- 50
15
votes
4 answers
GSON: How to get a case insensitive element from Json?
Code shown below works well when JSON object contains jsonKey as it was passed to the method. I wonder ... if there is a way to get a value assigned to a case insensitive representation of a key?
Example:
public String…

James Raitsev
- 92,517
- 154
- 335
- 470
15
votes
1 answer
ES6: Filter data with case insensitive term
This is how I filter some data by title value:
data.filter(x => x.title.includes(term))
So data like
Sample one
Sample Two
Bla two
will be 'reduced' to
Bla two
if I'm filtering by two.
But I need to get the filtered result
Sample Two
Bla two

user3142695
- 15,844
- 47
- 176
- 332
15
votes
5 answers
Ignore case when trying to match file names using find command in Linux
Right now, all I know to use is:
find / -name string.*
that is case sensitive and it won't find files named:
1string.x
STRing.x
string1.x
How can I search so that all the above would be returned in the search to a case-insensitive matching?

Captain Claptrap
- 3,839
- 5
- 25
- 29
15
votes
2 answers
Using InvariantCultureIgnoreCase instead of ToUpper for case-insensitive string comparisons
On this page, a commenter writes:
Do NOT ever use .ToUpper to insure comparing strings is case-insensitive.
Instead of this:
type.Name.ToUpper() == (controllerName.ToUpper() + "Controller".ToUpper()))
Do this:
type.Name.Equals(controllerName +…

Robert Harvey
- 178,213
- 47
- 333
- 501
14
votes
2 answers
How can I do case insensitive git diffing while also doing `git diff --color`?
Is it possible to do a case insensitive git diff while also doing git diff --color-words? Or do I need to use an external diff program while doing git diff --color-words?
( note: if all you want is git diff case insensitive please go to this…

Andrew Grimm
- 78,473
- 57
- 200
- 338
14
votes
3 answers
Java case-insensitive map with null key
Is there a Map implementation in Java that will use case-insensitive String matching for the key, but also supports the null key?
I know that
new TreeMap(String.CASE_INSENSITIVE_ORDER)
supports case-insensitive matching of String…

Gilo
- 640
- 3
- 23
14
votes
2 answers
Open a file case-insensitively in Ruby under Linux
Is there a way to open a file case-insensitively in Ruby under Linux? For example, given the string foo.txt, can I open the file FOO.txt?
One possible way would be reading all the filenames in the directory and manually search the list for the…

imgx64
- 4,062
- 5
- 28
- 44
14
votes
2 answers
Case insensitive search using findoneby()
I have one repository called $colorMaster
$colorMaster->findOneBy(array('name' => 'RED'));
It returns no records even though in my database there is records with Value "Red".
when i try to use same code with value…

Ashish Bhanderi
- 507
- 1
- 6
- 21
14
votes
1 answer
Rails validates_uniqueness_of across multiple columns with case insensitivity
I have a model that has two fields, which I will call first_name and last_name, and I want to make sure that the combination of the two are case-insensitively unique. I've gotten halfway there by using this:
validates_uniqueness_of :first_name,…

Jimmy
- 35,686
- 13
- 80
- 98
14
votes
4 answers
JQuery: How do I select a value from a dropdownlist case insensitive?
My scenario:
I have a textbox that the user enters text
The textbox has an onblur function that tries to select a value from a dropdownlist (if it exists) based on the textbox input
This works perfectly fine if the textbox value is the same case…

Bryan Denny
- 27,363
- 32
- 109
- 125
13
votes
3 answers
Case insensitive Charfield in django models
I am trying to achieve a category model where name has unique=True,
but practically I can still add same category name with different cases.
i.e. I have a category called Food
I am still able to add food, FOOD, fOod, FOOd
Is their any philosophy…

mmrs151
- 3,924
- 2
- 34
- 38
13
votes
5 answers
Case insensitive searching for words in mongoid
Is there a way to set an attribute in mongoid for case insensitive searches?
Lets say that somebody has a username: IAmGreat and I want to find the users data using their unique username without butchering it and changing it to iamgreat.
Thanks

GTDev
- 5,488
- 9
- 49
- 84