import re


def remove_tag(entry, alltag=False):
  """remove SRT and ASS tags
  if alltag, NoTagApp specials ([b]/[i]/[u]) tag are removed too
  """
  tag_pattern = r"{\\.*?}|</?font.*?>|</?.*?>"

  if alltag:
    tag_pattern += r"|\[/?.?\]"

  return re.sub(tag_pattern, "", entry)