| Author |
Case insensitive match
|
nimish kumar
Ranch Hand
Joined: Dec 04, 2009
Posts: 54
|
|
Hi,
How do I have a word match for case-insensitive, camel case match. Ex-
I want to find 'Insert' string from a SQL query. 'Insert' can be -
INSERT
insert
Insert
inserT
What should be pattern for the same.
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
How are you doing your matching? Is it in the database or in code?
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
nimish kumar
Ranch Hand
Joined: Dec 04, 2009
Posts: 54
|
|
I got the solution, just after posting the query
We will convert the string to uppercase and then search its soooo simple
We will convert the sql query and the string to be searched both in uppercase and then can do matching.
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32682
|
|
|
I am sure there are better ways to do it with a regular expression.
|
 |
 |
|
|
subject: Case insensitive match
|
|
|