The easiest way would be to use two passes. The first adds a blank line before each header:
perl -ple"$_ = qq[\n] . $_ if /^*header/" infile >modified
NB! Different quotes on *nix!
The second pass is just which ever of the earlier answers you like best.
In reply to Re: Re: multi-line match
by BrowserUk
in thread multi-line match
by pdotcdot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |