import re


def ExtractDescription(changelog_file, breaker_re):
  """Loads the file and extarcts the lines up to the specified breaker."""
  with open(changelog_file, 'r') as f:
    lines= f.readlines()
  changelog = ''
  for line in lines:
    # Ignore any trailing empty lines.
    if not changelog and not line.strip():
      continue
    # Stop at the breaker.
    if re.match(breaker_re, line.strip()):
      break
    changelog += line
  return changelog.strip()