in reply to m modifier not doing what I'm expecting?

Note that without /s, the dot . doesn't match a newline \n character.

Replies are listed 'Best First'.
Re^2: m modifier not doing what I'm expecting?
by Anonymous Monk on Dec 21, 2011 at 12:56 UTC

    This is not a problem here, as the dot isn't supposed to match a newline.

        I'm not the OP, but I think it's pretty clear the OP wants to extract the lines

        FOO: Example header 1 FOO: a FOO: Header 2 example FOO: Testing header item with some stuff in
        The non-greedy .+? also hints in this direction (though non-greediness is not required here, unless you're using /s).