[Issue 6212] New: regex fails to make matches that include newline

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jun 25 17:48:31 PDT 2011


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

           Summary: regex fails to make matches that include newline
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: cbkbbejeap at mailinator.com


--- Comment #0 from Nick Sabalausky <cbkbbejeap at mailinator.com> 2011-06-25 17:43:39 PDT ---
import std.stdio;
import std.regex;

void main()
{
    string str = "ABC\nDEF";
    str = str.replace(regex("B(.*)E"), "");
    writeln(str);
}

Expected Output:
AF

Actual Output:
ABC
DEF

Note that the "m" attribute ("treat as multiple lines separated by newlines")
was NOT used.

-- 
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