You're problem is that .* is greedy (i.e., it matches everything it possibly can). See also Death to Dot Star!.
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
Note: All code is untested, unless otherwise stated
In reply to Re: pattern matching question
by hardburn
in thread pattern matching question
by jxia
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |