Improve automatic window title regex for TM.