Bug #50790 | Bug in RegExp | ||
---|---|---|---|
Submitted: | 1 Feb 2010 12:44 | Modified: | 1 Feb 2010 17:02 |
Reporter: | Petr Valkoun | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S3 (Non-critical) |
Version: | 5.0.83 and 5.1.42 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | REGEXP |
[1 Feb 2010 12:44]
Petr Valkoun
[1 Feb 2010 15:18]
Giuseppe Maxia
Thanks for reporting, but this is nor a bug. The regular expressions used by MySQL are not the same used by Perl/PHP/Python. http://dev.mysql.com/doc/refman/5.1/en/regexp.html Your query should use the :alpha: or :alnum: character classes select 'airbag: 2 kopf- ' regexp '^[[:alpha:]]*:'; +--------------------------------------------+ | 'airbag: 2 kopf- ' regexp '^[[:alpha:]]*:' | +--------------------------------------------+ | 1 | +--------------------------------------------+
[1 Feb 2010 17:02]
Petr Valkoun
ok, thanks for expalining, I was confused because '^\\w*' worked, but now I tried it with '^\\w' and it doesnt and now I see why...sorry for tour time