An example of performing regex match and regex replace with std::wstring and std::u16string.
#include <iostream>
#include <sstream>
#if __cplusplus >= 201103L
#endif
int main() {
std::cout<<"\n"<<
std::wcout<<L"\n"<<
#if __cplusplus >= 201103L
std::cout<<"\n"<<
std::u16string us =
jpu::Regex(u
"subject").
replace(u
"I am a subject", u
"string (got replaced)");
std::wcout<<L"\n"<<std::wstring(us.begin(), us.end());
#endif
return 0;
}
- Author
- Md Jahidul Hamid