Cleaned up the regexp de-allocation + syntax check for --delete-regexp.