see quantifiers and matching repitions
UPDATE: The g modifier is more robust so toolic's solution is better.
In reply to Re: Regex Confusion by biohisham in thread Regex Confusion by Kelly22