.* is "greedy", but .*? is "lazy". The greedy version will find the longest match. The lazy version will find the shortest match. What you want here is the lazy version.
Actually, your question marks should be fine. I forget what that construct does, but I've seen it before.
Edit by Asker :
the working one