digitalmars.D.bugs - [Issue 5523] New: std.regex handles "\s" and "\W" (etc.) inside square brackets improperly
- d-bugmail puremagic.com (31/31) Feb 03 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5523
- d-bugmail puremagic.com (12/12) Feb 26 2012 http://d.puremagic.com/issues/show_bug.cgi?id=5523
http://d.puremagic.com/issues/show_bug.cgi?id=5523 Summary: std.regex handles "\s" and "\W" (etc.) inside square brackets improperly Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: lexlexlex gmail.com --- Comment #0 from Alex Folland <lexlexlex gmail.com> 2011-02-03 19:05:28 PST --- http://lex.clansfx.co.uk/projects/regexbugtest.d My workaround was to list all the characters \s is meant to match. Note that I have a bigger example of this bug if you're interested. Minimal example to avoid wasting your time: module main; import std.stdio,std.regex; void main() { //minimal regex; should match full "sec" but matches "s" instead //regextester.com handles it properly foreach(m; match("sec", regex(`([\s_]|sec)`, "gi"))) writefln("%s[%s]%s", m.pre, m.hit, m.post); return; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 03 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5523 Dmitry Olshansky <dmitry.olsh gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |dmitry.olsh gmail.com Resolution| |FIXED --- Comment #1 from Dmitry Olshansky <dmitry.olsh gmail.com> 2012-02-26 11:01:36 PST --- Works since 2.057. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 26 2012