Bug #22568 | REGEXP '[0-9]' and REGEXP '[:digit:]' produces different results | ||
---|---|---|---|
Submitted: | 21 Sep 2006 21:44 | Modified: | 21 Sep 2006 21:58 |
Reporter: | David Brown | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | mysql-5.1.11-beta-osx10.4-i686 | OS: | Max OSX 10.4 |
Assigned to: | Dean Ellis | CPU Architecture: | Any |
[21 Sep 2006 21:44]
David Brown
[21 Sep 2006 21:54]
Paul DuBois
The class name includes the surrounding [ and ] characters. As they are intended for use within a range, add another set of [ and ] characters. mysql> select '1' regexp '[:digit:]'; +------------------------+ | '1' regexp '[:digit:]' | +------------------------+ | 0 | +------------------------+ 1 row in set (0.01 sec) mysql> select '1' regexp '[[:digit:]]'; +--------------------------+ | '1' regexp '[[:digit:]]' | +--------------------------+ | 1 | +--------------------------+ 1 row in set (0.00 sec)