Funny, I'm finding all sorts of great uses for my qr//e idea today...
my $mac_re = do { my $tmp = join ':', ('[0-9a-f]' x 2) x 6; qr/$tmp/i; };
This is left intentionally non-anchored, so that you can use it even when searching inside a line:
my @macs = map { m/($mac_re)/g } qx( /sbin/ifconfig -a );
In reply to Re: Long regexp un multiple lines
by tkil
in thread Long regexp un multiple lines
by Lorand
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |