Because your regexp is greedy. See also Breaking file path into segments, perlretut.
Hope this helps!
In reply to Re: Regex to extract last 3 components of filename
by 1nickt
in thread Regex to extract last 3 components of filename
by mjurgens
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |