uppercase

Case insensitive SQL SELECT query examples

Case insensitive SQL SELECT query FAQ: How do I issue SQL SELECT queries while ignoring case (ignoring whether a string is uppercase or lowercase)?

When I first started writing SQL queries, I did some pretty crazy things to try to ignore case in my text/string queries. Unfortunately for me, I first started with Postgresql, and used some of their custom regular expression capabilities. That seemed like a good idea at the time, but when I tried to move my application to a MySQL database, I paid a price in having to rewrite my case-insensitive SQL queries.

Perl uppercase and lowercase string conversion

Perl lowercase/uppercase string FAQ: How do I convert a string to uppercase or lowercase in Perl?

Solution:

  • To convert a Perl string to all lowercase characters use the Perl "lc" function.
  • To convert a string to all uppercase characters use the Perl "uc" function.

Here are a couple of examples to help demonstrate this Perl uppercase/lowercase string conversion.

iPhone caps lock

After watching a young relative type on an iPhone recently, I realized he didn't know how to use the "iPhone caps lock" feature. I assumed a person younger than me would know how to use the iPhone caps lock feature, lol, but it's not too surprising, because enabling the caps lock feature isn't the most obvious thing in the world.

iPhone caps lock

To use the iPhone caps lock feature, whenever you're typing something -- like composing an email -- just tap the iPhone Shift button twice. You need to do this quickly, similar to a double-click.

Java - determine if a String contains a case-insensitive regex pattern

Java String FAQ: How can I tell if a Java String contains a given regular expression (regex) pattern?

In a Java program, you want to determine whether a String contains a case-insensitive regular expression (regex). You don't want to manipulate the String or extract the match, you just want to determine whether the pattern exists at least one time in the given String.

How to tell if a Java String contains a simple case-insensitive regex pattern

Java regex Problem: In a Java program, you want to determine whether a String contains a case-insensitive pattern. The pattern can be a simple String, or a more complicated regular expression (regex).

Linux: Case-insensitive file searching with locate and find

Earlier today someone asked for the source code for my TypeAhead predictive-text, type-ahead, auto-complete JNLP Swing application. While trying to remember where I put it I realized I was going to have to do some case-insensitive file searching.

I was happy to learn that both of my favorite Unix and Linux file-finding utilities support case-insensitive file searching.

How to perform a case-insensitive database query

Database FAQ: How do I do a case-insensitive database search?

Answer: When performing a database search using MySQL, PostgreSQl, SQL Server, Oracle, etc., I convert the results of the query to uppercase using the UPPER function, and make sure my search parameters are also in uppercase. Here's an example of how I do this when searching on the first_name field of an Employees database table:

Batch rename filenames with this shell script

Here's a Unix shell script that converts all "*.png" files in the current directory to lower-case names. In my case I had files named "Slide1.png", etc., and I wanted them to be named "slide1.png", and this script did the trick.

Syndicate content