Removing a badly written regex