Import re
Patt = re.compile(r'''
(? Plt;; Dtgt;; \d{2}-\d{2})
\s
(? Plt;; Tmgt;; \ d {1,2}: \ d {2}: \ d {2} \. \ d {3})
\s+
(\d+\s*)+
(? Plt;; Errorkeygt;; \w)
\s
(? Plt;; Flaggt;; \w+)
\s*
\: \ s
(? Plt;; 컨텐트 gt; . *)
', re.I|re.U|re.X)
Keyset = set()
With open ("bug.log") as f:
For m in filter(None, map(patt.match, f):
Flagk = m.group('flag')
Print m.group('flag')
Keyset.add(flagk)
Print','. join(['"s"'k for k in keyset])