in reply to How to substitute all the words before a certain word in the middle of a line?
Don't go with it, though. chromatic's regex is much nicer :-)foreach (@x=split(/(\.\s+)/, $text)) { s/^.*(\bnice\b.*)$/A $1/; } $text=join("", @x);
--ZZamboni
|
|---|