|
发表于 2022-6-8 23:00:21
|
显示全部楼层
- #include <iostream>
- #include <regex>
- using namespace std;
- int main()
- {
- wstring str = L"空中浩劫第一季(国语配音) - 1.空中浩劫S01E01:联合航空811号班机(国语配音无字幕)(Av802929849,P1).mp4";
- wregex pattern(L".*[::](.+)[((]国.*");
- wstring result = regex_replace(str, pattern, L"$1.mp4");
- setlocale(LC_ALL, "zh_CN.UTF-8");
- std::wcout << result << endl;
- return 0;
- }
复制代码 |
|