[Issue 7141] New: std.regex - escaped characters can form operators in character classes

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 20 04:05:55 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=7141

           Summary: std.regex - escaped characters can form operators in
                    character classes
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: mailme+d at nilsb.dyndns.org


--- Comment #0 from Nils <mailme+d at nilsb.dyndns.org> 2011-12-20 04:05:53 PST ---
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 ("||", "&&", "~~").

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list