import re
h = open('index_main.html', encoding='utf-8').read()
# split by {id:
parts = re.split(r'(?=\{id:")', h)
for p in parts:
    m = re.match(r'\{id:"([^"]+)",s:"([^"]+)"', p)
    if not m: continue
    bid, sid = m.group(1), m.group(2)
    en_m = re.search(r'en:"([^"]+)"', p)
    en = en_m.group(1) if en_m else ''
    if any(k in en.lower() for k in ['computer science','electrical engineering','eecs','computer engineering']):
        print(sid, '|', bid, '|', en[:100])
