in reply to Re^3: how to extract certain lines
in thread how to extract certain lines

If it is all in one line, you could split it on the ; and do something like the following:

while (<DATA>) { my @split=split/;/; foreach (@split) { if (/\bHERE IS THE DATA PLACED (\w+)/) { s/\bHERE IS THE DATA PLACED//; print $_; #print "Matched\n"; }else{ next; } } } __DATA__ HERE IS THE DATA PLACED ABC; DO NOT ENTER PLACED BCD; HERE IS THE DATA + PLACED ABC; WHO ARE U PLACED ABC ; __OUTPUT__ ABC ABC

Neil