On Mar 27, 11:48 am, [EMAIL PROTECTED] (Ciwei) wrote: > Given a multiple char patterns like ":C9" that repeated, how to write > a regex that repeat the patterns( which is non-atom ) 6 times. like > in > below > > WWPN:10:00:00:00:c9:2e:e8:90 > > I tried to define pattern to match > > my $match= qr/ {:[0-9a-e][0-9a-e]}{6} /; > print matched if /$match/ ;
I think it must be: qr/(:[0-9a-e][0-9a-e]){6}/; Note parenthesis instead of curly braces and no leading and trailing spaces. /sandy http://myperlquiz.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/