in reply to regex help

(.+)? and (.+) works same in your case, because (.+) forms a greedy pattern first and which nullifies the presence of ?