OSDN Git Service

Change regular expression for res matching and jbbs subject.
[fukui-no-namari/fukui-no-namari.git] / src / FukuiNoNamari / BbsType / bbs_type_base.py
index 2bd1dd3..00834ba 100644 (file)
@@ -22,8 +22,8 @@ import codecs
 
 from bbs_type_exception import BbsTypeError
 
-subject_reg_expr = re.compile("(?P<id>.*).dat<>(?P<title>.*)\((?P<res>\d*)\)")
-dat_reg_expr = re.compile("(?P<name>.*)<>(?P<mail>.*)<>(?P<date>.*)<>(?P<msg>.*)<>(?P<title>.*)")
+subject_reg_expr = re.compile("(?P<id>(?:(?!<>).)*).dat<>(?P<title>(?:(?!<>).)*)\((?P<res>\d*)\)")
+dat_reg_expr = re.compile("(?P<name>(?:(?!<>).)*)<>(?P<mail>(?:(?!<>).)*)<>(?P<date>(?:(?!<>).)*)<>(?P<msg>(?:(?!<>).)*)<>(?P<title>(?:(?!<>).)*)")
 
 
 class BaseType: