Bug 7141 – std.regex - escaped characters can form operators in character classes

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
Other
OS
Linux
Creation time
2011-12-20T04:05:00Z
Last change time
2012-02-10T06:51:51Z
Assigned to
nobody
Creator
nilsbossung

Comments

Comment #0 by nilsbossung — 2011-12-20T04:05:53Z
I think the pattern should be interpreted as CharacterClass('a', Range('-', 'b')), but currently it is interpreted as CharacterClass(Difference('a', 'b')): --- string pattern = `[a\--b]`; assert(match("-", pattern)); assert(match("b", pattern)); --- This also applies to the other set operators ("||", "&&", "~~").
Comment #1 by nilsbossung — 2012-01-18T18:27:39Z
Comment #2 by github-bugzilla — 2012-02-05T09:18:19Z
Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/e859e40a1720c4504e3574566476f00f23130234 Merge pull request #377 from NilsBossung/bugzilla7141 fix bugzilla issue 7141