Bug 5736 – std.regex matches digits with when \w is used

Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
Other
OS
Mac OS X
Creation time
2011-03-14T12:21:00Z
Last change time
2013-02-11T23:13:30Z
Assigned to
nobody
Creator
doob

Comments

Comment #0 by doob — 2011-03-14T12:21:10Z
The following assert fails due to \w matches digits. import std.regex; void main () { assert("1".match(regex(`\w`)).empty); }
Comment #1 by kennytm — 2011-03-14T16:36:43Z
What? \w by definition does match digits. It is the same as (in the ASCII range) [0-9a-zA-Z_].
Comment #2 by doob — 2011-03-15T00:42:28Z
Sorry, don't know what I was thinking. Closing as invalid.
Comment #3 by github-bugzilla — 2013-01-08T17:39:37Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/633d2d5a980b39adbc424936459bea126b314b10 Fixes Issue 5736 - Missing 'else' in 'static if' https://github.com/D-Programming-Language/phobos/commit/4014fe2110e839870d1283d475568126b79a06a6 Merge pull request #1061 from AndrejMitrovic/Fix5736 Issue 5736 - Missing 'else' in 'static if' in BaseClassesTuple
Comment #4 by github-bugzilla — 2013-02-11T12:20:28Z
Comment #5 by github-bugzilla — 2013-02-11T23:13:30Z