Seems to be working to me! -EricInput File -------------------------- this is a test [[ this is a test ]] this is also a test [[ this is also a test ]] Output -------------------------- this is a test this is also a test Code -------------------------- #!/usr/bin/perl -w use strict; open(FILE, "<test.txt") || die "Error: $!"; while(<FILE>) { $_ =~ s/\[\[[^\]]*\]s*\]/ /msg; print; } close(FILE);
In reply to Re: substition in multiple lines
by emilford
in thread substition in multiple lines
by yangtse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |