Questions tagged [case-insensitive]

0

votes
0

answer
4

Views

perl6 How to make subrule/regex case-insensitive when used in match?

I am trying to match any keywords in a group. Keywords are in array @b. I am unable to make case-insensitive matches. I have done some testing, and the following script is an example: > my $line = "this is a test line"; this is a test line > my @b = < tes lin > ; [tes lin] > my regex a { || @b }; r...
lisprogtor
1

votes
2

answer
387

Views

Case insensitive search on Case sensitive dictionary C#

I have a case Sensitive dictionary, Dictionary itemNames = new Dictionary(StringComparer.Ordinal); So I can have case sensitive keys in this dictionary. For example I can have below key value pairs, { test, 10 } { TEST, 20 } { test1, 30 } { test2, 40 } ... When someone passes key, I want to retri...
1

votes
2

answer
88

Views

How to use len and case insensitive?

stop = False text_count = 0 while stop is False: int_string = input("What is the initial string? ") int_string = int_string.lower() for a in int_string: for a in b: text_count += 1 if text_count < 3: print("Error: string must have at least 3 characters.") elif len(int_string) != 'X' or len(int_strin...
user2044600
1

votes
2

answer
248

Views

FireBird: combine upper with primary key constraint

I want to use case insensivity in more tables which came from other DB where the fields and indexes can be case insensitive. This means that we can search the needed row in any string format (DAta, Data, data, etc.), we can find that by any of these keys. I tried to use upper function with index, an...
durumdara
1

votes
2

answer
1.2k

Views

MySQL: Is it safe to lowercase or uppercase regular expression?

I use regular expressions in MySQL on multibyte-encoded (utf-8) data, but I need it to be match case-insensitively. As MySQL has bug (for many years unresolved) that it can't deal properly with matching multibyte-encoded strings case-insensitively, I am trying to simulate the "insensitiveness" by lo...
Honza Javorek
1

votes
2

answer
3.6k

Views

Java Script - How to search object within array efficiently [duplicate]

This question already has an answer here: JS - jQuery inarray ignoreCase() and contains() 2 answers I need to find an object (a string to be precise) inside a large array. While the below code works, it's tediously scrolling through each element of the array, a brute method. Is there a more efficie...
user1488934
1

votes
1

answer
494

Views

how to ignore case-sensitiveness and include nested documents when searching on Rails 4 with Mongoid

parent.rb class Parent include Mongoid::Document field :name, type: String field :hobby, type: String field :born, type: Date has_many :children accepts_nested_attributes_for :children def self.search(search) if search any_of({name: search}, {hobby: search}) end end end child.rb: class Child include...
Askar
1

votes
2

answer
390

Views

PHP/AJAX Case Insensitive search

I am trying to do create a case-insensitive search on multiple DB columns in a single search input. Currently I have the search working for multiple columns using a single search string. The issue is that it does not work case-insensitive. As an example...if I search a project's status: "paid" it w...
mitch
1

votes
1

answer
60

Views

Is there a way to make rfind() case insensitive?

I'm parsing a bunch of files for specific urls.. The subdirectory can be upper-case, lower-case or camel-case in these: search = "http://website.com/content/" + subdirectory + "/?" begin = contents.rfind(search) It would be great for this to work regardless of the case of the sub-directory.
some1
1

votes
3

answer
2.7k

Views

case insensitive check in if loop using regex in shell

I want to check the following condition, but it should be case insensitive. if [ "SPP" == $1 ] Is there anyway I can do it using regex.
Shitu
1

votes
1

answer
108

Views

Bash case in using variable that is piped wildcard values

CONDITION="*boss*|*mwc*|*puppet*|*nexus*" case in ${myvar1} ${CONDITION} ) echo HIT ;; * ) echo MISS ;; esac I have couple of issues with this: Above code does not work I want insensitive matches to be hit, eg. "Boss1234" or "system MWc", at the moment I know I can do eg. CONDITION="[mM][wW][cC]" bu...
Viktor
1

votes
1

answer
1.4k

Views

Ruby statements - case insensitivity?

I have a problem, I'm trying to create a method that finds words (or characters sequences)in a string and doesn't care about case sensitivity. For example both "ExAmPLE" and "example" would both return true. Here's my code class WordMethods # Finds words in a string and returns true or false def wor...
1

votes
2

answer
31

Views

What is currently the standard for database case

So have I read tons of convention about database and programming. However, I don't remember if there is one suggesting a standard case for database. Is it standard for a database to be case sensitive or is it standard to be case insensitive? I know some database technology default case vary from one...
AXMIM
1

votes
1

answer
1.6k

Views

Case Insensitive search in jquery-bootgrid

Hi I have implemeted jquery-bootgrid. However, searching is based on case. My requirement is that searching should be done irrespective of case used i.e If am searching for "Australia" and the user types "australia" or "Australia" result should be same. I looked into the documentation and the search...
Bikrem
1

votes
1

answer
76

Views

Case-insensitive in JavaScript [duplicate]

This question already has an answer here: JavaScript case insensitive string comparison 18 answers In the following code, a user is expected to enter "rock", "paper", or "scissors" in the userChoice prompt. However, if a user enters any of those three words partially or entirely in upper-case, as i...
pourrait Peut-être
1

votes
2

answer
102

Views

Understanding the ramifications of CultureInvariant and IgnoreCase on [A-Za-z]

If I create a Regex based on this pattern: @"[A-Za-z]+", does the set that it matches change at all by adding RegOptions.IgnoreCase if I'm already using RegOptions.CultureInvariant (due to issues like this)? I think this is an obvious "no, it's just redundant and repetitive". And in my tests that'...
Eric Lease
1

votes
2

answer
116

Views

Case-Insensitive String Filter

This is a line of code I found : if(!word.matches("[a-zA-Z]{"+word.length()+"}")) return; Specifically what does {"+word.length()+"} do, what's the logic behind it, and where can I read more about it?
Syukri Shukor
3

votes
6

answer
4.3k

Views

Case insensitive sorting of an array of strings

Basically, I have to use selection sort to sort a string[]. I have done this part but this is what I am having difficulty with. The sort, however, should be case-insensitive, so that "antenna" would come before "Jupiter". ASCII sorts from uppercase to lowercase, so would there not be a way to just s...
bsem
1

votes
1

answer
1.1k

Views

Make lowercase equal to capital letters in R

I need to check if 2 strings are the same between 2 tables. The problem is that the table 1 is in lowercase and the table 2 in capital letters. I need to make this function in R so it has to give a TRUE value for example in this case: "this is a string" == "THIS IS A STRING" Anyone can help me? Than...
Captain Nemo
1

votes
2

answer
1.5k

Views

Cassandra “select as” to be case sensitive

Cassandra version: 2.2.0 I have Cassandra table like below: app_id | ts | os_name ----------------------------------+--------------------------+----------- bb61ffae3b8f73e61572b61450d6d5d6 | 2015-08-04 22:00:00-0700 | Android bb61ffae3b8f73e61572b...
keypoint
2

votes
2

answer
4.9k

Views

MySQL Active record query ignoring case

I have the following active record query: $this->db->select('id, firstname, surname'); $this->db->from('users'); $this->db->where('site_id',$siteid); $this->db->like('firstname', $name); $this->db->or_like('surname', $name); $query = $this->db->get(); This works fine with the exception that my name...
Ben
16

votes
7

answer
72.4k

Views

How to compare character ignoring case in primitive types

I am writing these lines of code: String name1 = fname.getText().toString(); String name2 = sname.getText().toString(); aru = 0; count1 = name1.length(); count2 = name2.length(); for (i = 0; i < count1; i++) { for (j = 0; j < count2; j++) { if (name1.charAt(i)==name2.charAt(j)) aru++; } if(aru!=0...
Arush Kamboj
17

votes
4

answer
2.8k

Views

Case Insensitive Pattern Matching over String Lists

I'm trying to parse command line arguments in an F# application. I'm using pattern matching over parameters list to accomplish it. Something like: let rec parseCmdLnArgs = function | [] -> { OutputFile = None ; OtherParam = None } | "/out" :: fileName :: rest -> let parsedRest = parseCmdLnArgs rest...
Mehrdad Afshari
17

votes
8

answer
2.1k

Views

What is the purpose of case sensitivity in languages? [duplicate]

Possible Duplicates: Is there any advantage of being a case-sensitive programming language? Why are many languages case sensitive? Something I have always wondered, is why are languages designed to be case sensitive? My pea brain can't fathom any possible reason why it is helpful. But I'm sure ther...
Tom Gullen
17

votes
4

answer
15.2k

Views

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 for that key. The problem is, the key is obviously...
Eoin Campbell
18

votes
3

answer
16.7k

Views

Case insensitive JSON to POJO mapping without changing the POJO

Does anyone know how com.fasterxml.jackson.databind.ObjectMapper is able to map JSON properties to POJO properties case insensitive? JSON-String: [{"FIRSTNAME":"John","LASTNAME":"Doe","DATEOFBIRTH":"1980-07-16T18:25:00.000Z"}] POJO-Class: public class Person { private String firstName; private Strin...
Mark Fellner
2

votes
1

answer
1.4k

Views

Apache: Permanent redirect that is case-insensitive?

i have the following redirect: RedirectPermanent /SCJ https://fin-iq.com but it does not work for /scj, /sCj, etc. is there a way to make this case insensitive? i tried adding [NC,L] but the page crashed. thanks!
Garrett
2

votes
2

answer
11.5k

Views

Case insensitive compare against bunch of strings

What would be the best method to compare an NSString to a bunch of other strings case insensitive? If it is one of the strings then the method should return YES, otherwise NO.
Jeroen Devos
2

votes
1

answer
1.9k

Views

php, mysql: compare strings - accent sensitive and case insensitive

i need to perform a name search in the database based on a set of keywords. the result should be accent sensitive and case insensitive. following the solution i found here plus few modifications to allow case insensitivity, i used the following code: $sql = "SELECT name FROM table_names WHERE LOWER(...
u11
2

votes
1

answer
615

Views

Node glob isn't matching anything if path starts with “./” and nocase: true - bug or expected?

Reproduction instructions: Starting from an empty directory I created a package.json: { "dependencies": { "glob": "7.1.1" } } 7.1.1 is the latest version at the time of editing this post. I then ran npm install and finally the node command: > var glob = require('glob'); undefined > glob.sync('*'); [...
Bilal Akil
19

votes
2

answer
22.5k

Views

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 LIKE '%jose%'; I get 83 result rows. I should have...
Lightworker
6

votes
1

answer
2.1k

Views

Case insensitive sorting with Firebase orderByChild

I’m using a FirebaseRecyclerAdapter to display a list of strings. My query uses orderByChild. The results sorts with capitalize letters first and looks like this: Item 1, Item 2, Item 3, aItem, bItem, zItem. How do I use orderByChild resulting in case insensitive sorting?
Loren
19

votes
1

answer
9.5k

Views

Querying MongoDB (via pymongo) in case insensitive efficiently

I'm currently creating a website in python (pyramid) which requires users to sign up and log in. The system allows for users to choose a username which can be a mixture of capital letters, lowercase letters, and numbers. The problem arises when making sure that two users don't accidentally share th...
johneth
5

votes
4

answer
634

Views

I want -e to work case-sensitively on OS X. Is it possible?

I'm developing a script that makes use of the -e flag, as in unless (-e $fileName) { ... } This works fine on OS X. Or, rather, it doesn't work correctly. I want it to be case-sensitive. The script is also run on a Linux machine, and the -e check fails--rightly!--because of case sensitivity. I tried...
GJTorikian
19

votes
6

answer
8.3k

Views

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 CAPS".should include('All Caps')
Andrew
5

votes
5

answer
8.4k

Views

Is PHP not case sensitive?

I am using MySQL and PHP. In my database I have this table called users, and inside the users table have a record: username: admin password: password In my login page, I tried login as (password: password): username : ADMIN -> result : can login username : admin -> result : can login I store the use...
5

votes
2

answer
1.6k

Views

Case fold UTF-8 without knowing the language

I'm trying to evaluate different strategies for case insensitive UTF-8 string comparison. I've read some material from the Unicode consortium, experimented with ICU and tried to come up with various quality-of-implementation alternatives. On multiple occasions I've seen texts differ between Simple C...
Kim Gräsman
6

votes
5

answer
3.5k

Views

If MYSQL is case insensitive,How does it works for the Password field in Login?

I was wondering in case of normal select operation the search is case insenesitive. So SELECT * FROM tbl WHERE name = aBc will also consider name with values ABC,abc,abC etc but in case of login function we just do SELECT * FROM tbl WHERE password = aBc will be case sensitive and only consider pass...
techie_28
6

votes
1

answer
7.5k

Views

Why underline is usually used in the sql table names rather than camel case [closed]

In all the applications/examples I have already seen(eg. wordpress). The column table names use underline rather than camel case. I'd like to know if there are some technical incompatibility problems or it's a convention? Is it dependent of the system platform(Linux/Windows) or the sql dialect(Mysql...
Johnny
20

votes
2

answer
3.3k

Views

How to perform case insensitive diff in Git

git diff does not support a case-insensitive comparison of files. Google shows a very few people asking for that feature, and that too only in combination with some other git diff switch, like with -G or with --color-words. I don't care for other switches, as long as git diff can show me the case-in...
Gurjeet Singh

View additional questions