At 11:57 AM +0000 2/1/01, Dave Cave wrote:
>I have been running the 'menagerie' tutorial from the mySQL manual and sure
>enough SELECT * FROM pet WHERE name REGEXP "[wW]"; returns Claws, Bowser and
>Whistler. However, when I run SELECT * FROM pet WHERE name REGEXP "[w]"; (or
>[W]) I still get the same results. Is there something I need to set to make
>the expression case sensitive?

Ah, argh.  This happens because REGEXP was changed to be case insensitive
as of MySQL 3.23.4.  You can use the BINARY keyword to make the comparison
case sensitive:

SELECT * FROM pet WHERE name REGEXP BINARY "[w]";


Thanks for pointing this out.  We'll update the manual pronto.

-- 
Paul DuBois, [EMAIL PROTECTED]

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to