in reply to Re^3: Two line match
in thread Two line match

That works except that it only converts two lines of ----- into one. I wanted it to be able to convert any number of lines on ----- into 1 line of it. Shouldn't the /g do that? Jeff

Replies are listed 'Best First'.
Re^5: Two line match
by moritz (Cardinal) on Mar 10, 2008 at 15:43 UTC
    The /g never handles overlapping matches in order to avoid infinite loops.

    But you can modifiy your regex: m/----(?:\n----)+/----/g