in reply to Re^2: multi-line regexp
in thread multi-line regexp

Well, this code of yours makes some very specific assumptions about the input string: The regexes with look-ahead where proposed to cover a wider range of input strings.