how about trying these? just playing with your fastest and adding sentinal ':'s before processing and removing them after.
zen3 => 'my $mac = ":".$data.":"; $mac =~ s/(?<=:)(?=[0-9a-fA-F](?: +:))/0/g; $mac =~ s/^:|:$//; $mac;', zen4 => 'my $mac = ":$data:"; $mac =~ s/(?<=:)(?=[0-9a-fA-F](?::))/ +0/g; $mac =~ s/^:|:$//; $mac;', zen5 => 'my $mac = ":$data:"; $mac =~ s/(?<=:)(?=[0-9a-fA-F](?::))/ +0/g; $mac = substr $mac, 1,-1; $mac;',
my results are varied:
Rate zen2 zen3 ike_fast zen4 zen5 zen2 152990/s -- -1% -1% -4% -6% zen3 154915/s 1% -- -0% -3% -5% ike_fast 155051/s 1% 0% -- -3% -5% zen4 159115/s 4% 3% 3% -- -2% zen5 162584/s 6% 5% 5% 2% -- Rate zen2 ike_fast zen4 zen3 zen5 zen2 147082/s -- -3% -3% -3% -5% ike_fast 150866/s 3% -- -0% -1% -3% zen4 151345/s 3% 0% -- -1% -3% zen3 152312/s 4% 1% 1% -- -2% zen5 155404/s 6% 3% 3% 2% -- Rate zen2 ike_fast zen4 zen5 zen3 zen2 132209/s -- -1% -4% -10% -13% ike_fast 134054/s 1% -- -3% -9% -11% zen4 137554/s 4% 3% -- -6% -9% zen5 147053/s 11% 10% 7% -- -3% zen3 151234/s 14% 13% 10% 3% -- Rate zen2 ike_fast zen3 zen4 zen5 zen2 148516/s -- -2% -3% -4% -7% ike_fast 151827/s 2% -- -1% -1% -5% zen3 153467/s 3% 1% -- -0% -4% zen4 153946/s 4% 1% 0% -- -4% zen5 159757/s 8% 5% 4% 4% --

In reply to Re^4: Regex overlap in MAC address by Anonymous Monk
in thread Regex overlap in MAC address by superfrink

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.