An operation is case insensitive when uppercase and lowercase characters are equally treated.
Questions tagged [case-insensitive]
1146 questions
29
votes
4 answers
TypeScript type ignore case
I have this type definition in TypeScript:
export type xhrTypes = "GET" | "POST" | "PUT" | "DELETE" | "OPTIONS" | "CONNECT" | "HEAD";
Sadly, this is case sensitive...is there any way to define it case insensitive?
thanks

marco burrometo
- 1,055
- 3
- 16
- 33
29
votes
1 answer
PHP: Case-insensitive parameters
How do I accept passed GET or POST values case insensitively?
Like sample.php?OrderBy=asc will still be the same as sample.php?orderby=asc or sample.php?ORDERBY=asc
Is there a means of achieving the above efficiently?

VeeBee
- 847
- 4
- 13
- 30
28
votes
2 answers
How to create a case insensitive copy of a string field in SOLR?
How can I create a copy of a string field in case insensitive form? I want to use the typical "string" type and a case insensitive type. The types are defined like so:

harschware
- 13,006
- 17
- 55
- 87
27
votes
3 answers
Pandas: Refer to column name, case insensitive
Using Pandas DataFrame, let's say I have a bunch of columns in a csv file, and I want to be able to access any one of them via case insensitive name.
import pandas as pd
df = pd.read_csv(path_to_csv, delimiter=",")
df2 = df["Size"]
The actual…

P A N
- 5,642
- 15
- 52
- 103
27
votes
2 answers
Is it possible to do a case-insensitive `gsub`?
I am doing a gsub to swap "bad" for "good". Is there a way to use capitalize so it will swap both lower and upper case? Or will I have to write the def twice?
def add_more_ruby(string)
string.gsub('bad','good').capitalize
end

Stacca
- 791
- 2
- 8
- 19
27
votes
3 answers
How to make this .htaccess rule case insensitive?
This is a rule in my .htaccess
# those CSV files are under the DOCROOT ... so let's hide 'em
Order Allow,Deny
Deny from all
I've noticed however that if there is a file with a lowercase or mixed case extension…

alex
- 479,566
- 201
- 878
- 984
27
votes
2 answers
Laravel Eloquent Ignore Casing
I am trying to run a query using Eloquent
the $vars['language'] is in lower case but the language column is not necessarily in lower case. How can i do this search using eloquent but still have the lower case in the query
Item::where('language',…

Lpc_dark
- 2,834
- 7
- 32
- 49
26
votes
5 answers
How to make string check case insensitive?
I've started learning Python recently and as a practise I'm working on a text-based adventure game. Right now the code is really ineffective as it checks the user responce to see if it is the same as several variations on the same word. How do I…

Jack
- 381
- 2
- 4
- 5
24
votes
4 answers
Why is Common Lisp case insensitive?
Is there an advantage to defining a function like (defun hi () "Hi!") and be able to call it by using (hi) or (HI) or (Hi), or to (setf a-number 5) and be able to access that number using a-number, A-NUMBER, or A-Number?
If there is such an…

wrongusername
- 18,564
- 40
- 130
- 214
24
votes
4 answers
Can JSON schema enums be case insensitive?
JSON Schema enums
JSON Schemas feature enums, which impose a constraint on the values of a string type:
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "string"
},
…

Adam Matan
- 128,757
- 147
- 397
- 562
24
votes
6 answers
PostgreSQL case insensitive SELECT on array
I'm having problems finding the answer here, on google or in the docs ...
I need to do a case insensitive select against an array type.
So if:
value = {"Foo","bar","bAz"}
I need
SELECT value FROM table WHERE 'foo' = ANY(value)
to match.
I've…

PerryW
- 1,426
- 1
- 15
- 25
24
votes
6 answers
Case insensitive Rspec match
I'm writing a Capybara test and using Rspec for the assertions. My test is failing because there is a CSS style being applied that is causing the text to be in all caps. How can I rewrite this so that it is a case insensitive assertion?
"ALL…

Andrew
- 227,796
- 193
- 515
- 708
23
votes
3 answers
Case insensitive regex in Bash
I want to know which method is better to check if a var (input by user on keyboard) matches with a regex in a case insensitive way. I know there are some different possibilities. Example: I want a regex matching an empty value and all of this list:…

OscarAkaElvis
- 5,384
- 4
- 27
- 51
23
votes
2 answers
How to ignore case sensitivity in StartsWith for LINQ FindAll?
I have the following code:
ContactList = ContactList.FindAll(p => p.DeptName.StartsWith(optAlpha.SelectedItem.Value)).ToList();
If DeptName="test" and optAlpha.SelectedItem.Value="T", it doesn't work.
I tried with the following code, still doesn't…

WinFXGuy
- 1,527
- 7
- 26
- 47
22
votes
2 answers
How to MySQL work "case insensitive" and "accent insensitive" in UTF-8
I have a schema in "utf8 -- UTF-8 Unicode" as charset and a collation of "utf8_spanish_ci".
All the inside tables are InnoDB with same charset and collation as mentioned.
Here comes the problem:
with a query like
SELECT *
FROM people p
WHERE p.NAME…

Lightworker
- 593
- 1
- 5
- 18