![]() |
#2
rjsp2022-06-06 09:38
|
今天,在复习最近学习的知识点。。。
发现,以前解决过的这个问题,又忘了。。。
脑子全是浆糊,就是想不起来,是如何解决地了。。。
只好,又来麻烦大家了。。。

#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, "chs");
std::wcout << result << endl;
return 0;
}
#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, "chs");
std::wcout << result << endl;
return 0;
}
只有本站会员才能查看附件,请 登录
只有本站会员才能查看附件,请 登录