catch exceptions when regexes dont work