OSDN Git Service

Regular expression for subject.txt is corrected.
authorAiwota Programmer <aiwotaprog@tetteke.tk>
Sun, 12 Jul 2009 01:47:41 +0000 (10:47 +0900)
committerAiwota Programmer <aiwotaprog@tetteke.tk>
Sun, 12 Jul 2009 01:47:41 +0000 (10:47 +0900)
src/bbs_detail_base.cxx

index 2723f65..653f9f6 100644 (file)
@@ -219,7 +219,7 @@ void Base::load_subject_from_string(const std::string& subject,
 
   using namespace boost::xpressive;
   const sregex regex = (s1=repeat<9,10>(_d)) >> ".dat" >> *_s >> "<>"
-  >> (s2=-+_) >> '(' >> *_s >> (s3=+_d) >> *_s >> ')' >> *_;
+  >> (s2=-+_) >> '(' >> *_s >> (s3=+_d) >> *_s >> ')';
 
   std::vector<SubjectItem> list;
 
@@ -230,6 +230,7 @@ void Base::load_subject_from_string(const std::string& subject,
   ss << subject;
   std::string line;
   while (std::getline(ss, line)) {
+    boost::algorithm::trim_right(line);
     try {
       const std::string utf8 =
         get_encoding() == "cp932" ? convert::cp932(line) :