in reply to Negative Look Ahead issue

This prints test. Changed the lookahead to ((?:(?!\n\n).)*)

use strict; use warnings; my $s = do {local $/, <DATA>}; $s =~ s/\w+\s+\w+\s*\d+\s*\,((?:(?!\n\n).)*)\n\n/'test'/egsi; print $s; __DATA__ LMTRILOG db 5 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 +, 0 , 0 , 0; db 25 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 + , 0 , 0 , 0;