class_docstr: Helper utils for Model Archiver tool.
  This class lists out all the methods such as validations for model archiving.
docstr: Method checks whether model name passes regex filter.
  If the regex Filter fails, the method exits.
  :param model_name:
  :return:
docstr_tok: ["Method","checks","whether","model","name","passes","regex","filter",".","If","the","regex","Filter","fails",",","the","method","exits",".",":","param","model_name",":",":","return",":"]
code: def check_model_name_regex_or_exit(model_name):
      """
      Method checks whether model name passes regex filter.
      If the regex Filter fails, the method exits.
      :param model_name:
      :return:
      """
      if not re.match(r"^[A-Za-z0-9][A-Za-z0-9_\-.]*$", model_name):
          raise ModelArchiverError(
              "Model name contains special characters.\n"
              "The allowed regular expression filter for model "
              "name is: ^[A-Za-z0-9][A-Za-z0-9_\\-.]*$"
          )
  
imports: import glob
  import logging
  import os
  import re
  import shutil
  import tarfile
  import tempfile
  import zipfile
  from io import BytesIO
  from pathlib import Path
  from .manifest_components.manifest import Manifest
  from .manifest_components.model import Model
  from .model_archiver_config import ModelArchiverConfig
  from .model_archiver_error import ModelArchiverError
label_desc: Use image node_id 13 for calling the ModelExportUtils obj's underlying member method code with example usage: obj.check_model_name_regex_or_exit(model_name) without return types