Hi, ilovechristy, here is one way to do it. Also have a look at perlre.
use strict; use warnings; local $/; my $data = <DATA>; $data =~ s/COMMENT:(?:(?!-----).)*-----//gs; print $data; output: ------- AUTHOR: bobMonk TITLE: Monk Software Chart STATUS: Publish CATEGORY: Monks DATE: 05/21/2006 11:36:16 AM -----
Prasad
In reply to Re^3: Delete all "records" which contain a regex match
by prasadbabu
in thread Delete all "records" which contain a regex match
by ilovechristy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |