prints$line = "this is a test [[ this is a test ] ]"; $line =~ s/\[\[[^\]]*\]\s*\]/***FOO***/sg; print "Line: '$line'\n";
You also don't need the /m modifier in this case, since you're not using ^ or $ in your regex.Line: 'this is a test ***FOO***'
In reply to Re: substition in multiple lines
by thelenm
in thread substition in multiple lines
by yangtse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |