# Option 1: my $item_regex = qr/ (?:int)\s+(\w+)\s*?\n (?:\s*Number\ of\ Flaps:\s(\d+)\s*?\n)? (?:\s*IP\sAddress:?\s([\d\.]+)\s*?\n)? /x; while (<DATA>) { if (/^$item_regex+\Z/) { print "$1, $2, $3\n" while (/\G$item_regex/g); } }
In reply to Re^3: Making regex /g match continuously
by Roy Johnson
in thread Making regex /g match continuously
by scottb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |