当前位置: 首页 > news >正文

网站短期培训能学什么网站建设范本

网站短期培训能学什么,网站建设范本,广州o2o网站建设,桂林象鼻山在哪判断字符串是否包含正则表达式默认的特殊字符 业务描述#xff1a; 上层配置的字符列表中#xff0c;既有准确的字符串#xff0c;又有可以进行正则匹配的字符串#xff0c;这时候需要区分出来那些是正则匹配的字符串。 思路: 判断字符串中#xff0c;是否存在正则表达…判断字符串是否包含正则表达式默认的特殊字符 业务描述 上层配置的字符列表中既有准确的字符串又有可以进行正则匹配的字符串这时候需要区分出来那些是正则匹配的字符串。 思路: 判断字符串中是否存在正则表达式默认的特殊字符如*^${}等。 代码 #include iostream #include regexusing namespace std;// check if code contains regex special chars:*$^?\{}| static const string regexLimit {.*[*$^?\\\\{}|].*}; static const std::regex pattern(regexLimit); bool isRegex(const std::string str) {try {return std::regex_match(str, pattern);}catch(const std::exception e) {std::cout regex error: e.what() endl;return false;} }int main(int argc, char const *argv[]) {std::cout hello world! std::endl;string temp1 *demo.*;string temp2 ^com.*.demo.*;string temp3 car$;string temp4 com.ddmode;string temp5 com.d?dmode;string temp6 com.d\\dmode;string temp7 com.d{dmode;string temp8 com.d}dmode;string temp9 com.d|dmode;string temp41 com.demo.test;vectorstd::string list;list.push_back(temp1);list.push_back(temp2);list.push_back(temp3);list.push_back(temp4);list.push_back(temp5);list.push_back(temp6);list.push_back(temp7);list.push_back(temp8);list.push_back(temp9);list.push_back(temp41);for (size_t i 0; i list.size(); i){bool result isRegex(list[i]);printf(i:%ld isRegex?:%d\n, i, result);}printf(hello world end.);return 0; }输出 hello world! i:0 isRegex?:1 i:1 isRegex?:1 i:2 isRegex?:1 i:3 isRegex?:1 i:4 isRegex?:1 i:5 isRegex?:1 i:6 isRegex?:1 i:7 isRegex?:1 i:8 isRegex?:1 i:9 isRegex?:0 hello world end.
http://www.w-s-a.com/news/924739/

相关文章:

  • 图片网站怎么做排名怎么分析一个网站seo
  • 伪原创对网站的影响深圳装修公司排名100强
  • 网站建设公司效果个人可以做医疗信息网站吗
  • 网站使用arial字体下载微网站 建设
  • 文化馆网站建设意义营销型国外网站
  • 公司网站定位建议wordpress怎么用模板
  • 中国十大热门网站排名计算机选什么专业最好
  • 怀化建设企业网站太原网站关键词排名
  • 空间注册网站网站制作是怎么做的
  • 数码家电商城网站源码一个网站的成本
  • 网站伪静态是什么意思麻涌东莞网站建设
  • 理县网站建设公司郑州仿站定制模板建站
  • 手机网站建设网站报价诸城人才网招聘网
  • 一起做网站怎么下单临沂网站制作
  • 公司网站案例企业网站 模版
  • 做的好的响应式网站有哪些网站界面设计案例
  • 上海创意型网站建设icp备案网站信息
  • 网站没收录中山手机网站制作哪家好
  • 代驾软件开发流程wordpress 博客主题 seo
  • 成都的教育品牌网站建设网站广告js代码添加
  • 网站找人做seo然后网站搜不到了网站建设seoppt
  • 做网站优化有用吗学做文案的网站
  • wordpress 知名网站怎么做微网站
  • 用电脑怎么做原创视频网站河南建设工程信息网一体化平台官网
  • 云服务器和网站空间郑州做招商的网站
  • 规模以上工业企业的标准北京seo结算
  • 软件开发过程模型如何做网站性能优化
  • 网站建站公司广州南京江北新区楼盘
  • 哪些做展架图的网站好开发公司2022年工作计划
  • 磨床 东莞网站建设wordpress下载类主题系统主题