docs: def findalliter(string, sub, regex=False, case_sensitive=False,
                  whole_word=False):
      """
      Generator that finds all occurrences of ``sub`` in  ``string``
      :param string: string to parse
      :param sub: string to search
      :param regex: True to search using regex
      :param case_sensitive: True to match case, False to ignore case
      :param whole_word: True to returns only whole words
      :return:
      """
      if not sub:
          return
      if regex:
          flags = re.MULTILINE
          if not case_sensitive:
              flags |= re.IGNORECASE
          for val in re.finditer(sub, string, flags):
              yield val.span()
      else:
          if not case_sensitive:
              string = string.lower()
              sub = sub.lower()
          for val in finditer_noregex(string, sub, whole_word):
              yield val, val + len(sub)