C++ 代码 获取匹配的字符串数组或替换
#include
#include
// 使用类 std::regex_iterator 来进行多次搜索....std::string match_str = match.str();
std::cout << match_str << '\n';
}
// 把所有 img src 的绝对路径替换为...images 开始的相对路径.使用分组即可....\w+\s*-(\s*[^,;]+)
样本:
fsd-fsdfs fds-fsdfs,werfsd-fewrwrw;fewrwer,fdf -fdf fsdew- fd90
匹配结果:
fsd-fsdfs...:[^"])*"
样本: your dollors,10000, 27 years old ,,"10,000","it is "10 Grand",baby",10k
匹配结果: your dollors