Add try-catch block around a regex construction

Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com>
Show regex error messge in AutoTextTestDlg

Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com>