But you can modifiy your regex: m/----(?:\n----)+/----/g
In reply to Re^5: Two line match by moritz in thread Two line match by jrosenfeld