# -*- coding: utf-8 -*-
import re, pathlib, sys, io
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8", errors="replace")
BASE = pathlib.Path(r"D:\work buddy\2026-11-05-14-15-52")
t = (BASE / "cache" / "bursar-fall26.html").read_text(encoding="utf-8", errors="replace")
t = re.sub(r"<[^>]+>", " ", t)
t = re.sub(r"[ \t]+", " ", t)
keys = ["MSECE", "MSQCF", "MSSCE", "MSIE", "MSOR", "MSCSE", "MSMSE", "MSMATH", "MSURB", "MSANLT", "MSPHYS", "MSCHE", "MSNRE", "MSCE", "MSCIV"]
for k in keys:
    m = [mm.start() for mm in re.finditer(k, t)]
    for p in m[:1]:
        print("==", k, ":", t[max(0, p-160):p+220].replace("\n", " "))
