3 messages in com.mysql.lists.mysqlRe: REGEXP - case insensitive
FromSent OnAttachments
Phil Schrettenbrunner06 Sep 2000 05:43 
geoka06 Sep 2000 06:21 
Richard Ellerbrock07 Sep 2000 00:38 
Subject:Re: REGEXP - case insensitive
From:Richard Ellerbrock (rich@eskom.co.za)
Date:09/07/2000 12:38:56 AM
List:com.mysql.lists.mysql

Phil Schrettenbrunner wrote:

Hello List,

Playing around with MySQL 3.22.32 on my SuSE 7.0 Pro Linux I found out that if I use a REGEXP, the matching is case sensitive.

For v3.22.x it is case sensitive, for 3.23.x it is not case sensitive! The behaviour changed between the two versions.

I have seen some diskussions in the Mailiglist archive, but I could not find a solution on how to get the matching case _in_sensitive.

I also can not switch to LIKE, as I need other REGEXP funktions, too.

Here is, what I want to do, and it should ignore the case: (It is a Perlprogramm)

SELECT COUNT(*) FROM ADDR WHERE VALID=1 AND (ADDRESS REGEXP '\^$Address\$' AND NAME REGEXP '\^$NameRE\$')

How about using lower(ADDRESS) REGEX 'xxxx' in v3.22 or upgrade to v3.23 to get the behaviour you require. In 3.23 to force case sensitivity, use the BINARY keywork before the coulumn name.