Capture bad regex errors