File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Case insensitive match

 
nimish kumar
Ranch Hand
Posts: 60
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20393
46
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you doing your matching? Is it in the database or in code?
 
nimish kumar
Ranch Hand
Posts: 60
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 47293
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sure there are better ways to do it with a regular expression.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic