in reply to why my reg ex matches greedy?
The (.*) part is greedy because you've not used the ungreedy quantifier. The ungreedy version is (.*?).