in reply to Re: what means this regex? $x = qr/[0-9a-f]{4|8}/
in thread what means this regex? $x = qr/[0-9a-f]{4|8}/
That was a poorly worded Q you responded to. To be clear, it was a muse, rather than write "4 or 8 hex chars" other longer ways. You saw a 2nd interpretation that I had dismissed:
Doing bitwize-or: {4|8} = {12}; gives only 1 match-length, which is already doable '{12}'
Doing match-length-alternation, insofar as it allows multiple lengths to be given, seems more useful.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: what means this regex? $x = qr/[0-9a-f]{4|8}/
by Zaxo (Archbishop) on Jun 09, 2006 at 14:47 UTC |
In Section
Seekers of Perl Wisdom