in reply to regex problem

The (.*?) in your regex uses minimal matching so it stops at the first ); it finds. Use (.*) if you want it to capture until the last );.