| 12345678910 |
- # -*- coding: utf-8 -*-
- import json, re, sys
- sys.stdout.reconfigure(encoding="utf-8")
- paras = json.load(open(r"C:\Users\aroun\Desktop\在线考试系统\_paras.json", encoding="utf-8"))
- pat = re.compile(r"^([一二三四五六七八九十]+、|第[一二三四五六七八九十\d]+[章节]|\d+(\.\d+)*\s|([一二三四五六七八九十]+))")
- for i,p in enumerate(paras):
- t = p["text"].strip()
- if not t: continue
- if pat.match(t) and len(t) < 60:
- print(i, "|", t)
|