check for regex errors, undo from terminal