2013年10月20日

正则匹配

摘要: #include using namespace std;bool check(const char* s, const char* p){ if(*p==0) return 0==*s; if(*(p+1)!='+') { if(*p==*s || (*p=='.' && *s!=0)) { return check(s+1,p+1); } return false; } else { while(*p==*s || (*p=='.' && *s!=0)) ... 阅读全文

posted @ 2013-10-20 15:02 Knuth_档案 阅读(210) 评论(0) 推荐(0) 编辑

导航