microsoftxiao

记忆 流逝

导航

2006年11月10日 #

使用Replace[转]

摘要: [code]int main(int argc, char** argv){ boost::regex reg("(中国)(人)(r)", regbase::extended | regbase::icase); std::string s="中国人r, 中国人rs, color, 中国人rize"; //输入的串 s = boost::regex_replace(s,reg,"... 阅读全文

posted @ 2006-11-10 16:23 龙巢NET刀 阅读(183) 评论(0) 推荐(0)

用Boost来查找过滤字符串

摘要: 虽然网上讨论不少Boost正则表达式的问题,推荐用其他正则库,但是还是用了下。[code]#include #include #include //使用正则表达式 #include //#include "../PStringConv/PStringConv.h" #include using namespace std;using namespace boo... 阅读全文

posted @ 2006-11-10 15:27 龙巢NET刀 阅读(537) 评论(0) 推荐(0)