note
AnomalousMonk
<blockquote><i>
<c>my ($addr) = $line1 =~ /addr:(0x(?:[[:xdigit:]]{2})+)/;</c>
</I></BLOCKQUOTE>
<p>
If the hex value really is an address as <c> 'addr' </C> suggests, is there any guarantee the hex digits will always be paired, i.e., always be an even number of digits? If they are not paired, won't the lack of a boundary assertion sometimes cause an incorrect value to be extracted from the string?
<c>
c:\@Work\Perl\monks>perl -wMstrict -le
"my $line1 = 'addr:0xabcde';
my ($addr) = $line1 =~ /addr:(0x(?:[[:xdigit:]]{2})+)/;
print qq{'$addr'};
"
'0xabcd'
</C>
</P>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-634253">
<hr><p>Give a man a fish<b>:</B> <c> <%-{-{-{-<</C></P>
</div></div>
1230292
1230319