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

--- Comment #0 from Alex Folland <> 2011-02-03 19:05:28 PST 

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
  // handles it properly
  foreach(m; match("sec", regex(`([\s_]|sec)`, "gi")))
    writefln("%s[%s]%s", m.pre, m.hit,;

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to