From Regular expression
The standard quantifiers in regular expressions are greedy, meaning they match as much as they can, only giving back as necessary to match the remainder of the regex.
By using a lazy quantifier, the expression tries the minimal match first.