Updated regex test harness to catch exceptions.