Better error parsing

Seems like there are two types of foreign key error messages, one which includes the table the the end and another that includes it at the start.
Split out the regex to make it agnostic of what type of error you might have.