keep track of your last line's match. If you'll wrap your regex in parenthesis like so if (/(cache|disk-)/i), you can assign the match to a variable, like so $lastmatch = $1;, then each pass through your loop, you then can print "\n" if ($lastmatch ne $1 and "disk-" eq lc $1);
In reply to Re: regexp look behind?
by raybies
in thread regexp look behind?
by dbs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |