正则是个很重要的东西,他有很多用处 这里我就发几个正则使用的代码 我们常用的3个函 regex_replace(替换),regex_match(匹配),regex_search(搜索) 首先是替换的,运行可以发现"我的博客:blog.icodef.com"替换成为了"我的博客:替换文本" [cpp] #include <iostream> #include <string> #include <regex> using namespace std; int main() { re…
正则是个很重要的东西,他有很多用处 这里我就发几个正则使用的代码 我们常用的3个函 regex_replace(替换),regex_match(匹配),regex_search(搜索) 首先是替换的,运行可以发现"我的博客:blog.icodef.com"替换成为了"我的博客:替换文本" [cpp] #include <iostream> #include <string> #include <regex> using namespace std; int main() { re…