Thread overview
[Issue 2107] New: Regexp multiline attribute is broken
May 15, 2008
d-bugmail
May 15, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2107

           Summary: Regexp multiline attribute is broken
           Product: D
           Version: 2.012
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: nyphbl8d@gmail.com


When matching on text that includes newlines, multiline matching (splitting the
string on newlines first and then matching on individual lines) seems to be the
default and makes the "m" attribute useless.  It also requires the removal of
all newlines if they need to be matched over.  The following code snippet
should show the issue:
if (auto m = std.regexp.search("foo\nbar","f.*r")) {
        writefln("match found: %s",m.match(0));
} else {
        writefln("no match!");
}


-- 

October 11, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2107


Andrei Alexandrescu <andrei@metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |andrei@metalanguage.com
         AssignedTo|nobody@puremagic.com        |andrei@metalanguage.com


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 26, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=2107


Andrei Alexandrescu <andrei@metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |INVALID


--- Comment #1 from Andrei Alexandrescu <andrei@metalanguage.com> 2010-09-25 22:21:18 PDT ---
The "m" flag refers to the behavior of ^ and $, not that of the dot.

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