$\ = "\n";
$date = "20020731";
print join "/", ($date =~ /(\d{4})(\d{2})(\d{2})/)[1,2,0]; # this works
print join "/", ($date =~ /(\d{4})(\d{2}){2}/)[1,2,0]; # this doesn't

__END__

why did the second pattern not capture the second occurance of \d{2} ?
Is this the correct action? or should it capture the second one in the
second example?
Is there a way to capture like so (like second example as I expected it to
work)?


Nikola Janceski

If you enjoy what you do, you'll never work another day in your life.
-- Confucius 


----------------------------------------------------------------------------
--------------------
The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to