code: def _get_regex_pattern(label):
      
      parts = _split_by_punctuation.split(label)
  
      for index, part in enumerate(parts):
          if index % 2 == 0:
              # Word
              if not parts[index].isdigit() and len(parts[index]) > 1:
                  parts[index] = _convert_word(parts[index])
          else:
              # Punctuation
              if not parts[index + 1]:
                  # The separator is not followed by another word. Treat
                  # it as a symbol.
                  parts[index] = _convert_punctuation(
                      parts[index],
                      current_app.config["CLASSIFIER_SYMBOLS"]
                  )
              else:
                  parts[index] = _convert_punctuation(
                      parts[index],
                      current_app.config["CLASSIFIER_SEPARATORS"]
                  )
  
      return "".join(parts)
docs: Return a regular expression of the label.
  
      This takes care of plural and different kinds of separators.