摘要: #include "regex.h"bool isEmail(const char *email){ const char *eset = "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}"; regex_t re; regmatch_t subs[10]; regex_t stuRT; regcomp(&stuRT, eset, REG_EXTENDED); int err = regexec(&stuRT, email, (size_t)10, subs, 0); if... 阅读全文
posted @ 2013-10-14 15:40 haroel 阅读(361) 评论(0) 推荐(0) 编辑