Try:
āMatch ^m = Regex::Match( number[i], R"(\w{5}-\w{5}-\w{5}-\w{5}-\w{5})" );
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm working with c# regex and got the expected result
var match = Regex.Match(sub, @"\w{5}-\w{5}-\w{5}-\w{5}-\w{5}");
So now I'm working with the same code with managed c++, now Im getting error in Regex.Match().
Match m = Regex::Match(number[i], "\w{5} - \w{5} - \w{5} - \w{5} - \w{5}");
but I'm getting the following error "no suitable user-defined conversion from "System::Text::RegularExpressions::Match ^" to "System::Text::RegularExpressions::Match" exists"
I also used raw string for the regex pattern, still the issue is resolved
Match m = Regex::Match(number[i], R"~(\w{5} - \w{5} - \w{5} - \w{5} - \w{5})~");
Try:
āMatch ^m = Regex::Match( number[i], R"(\w{5}-\w{5}-\w{5}-\w{5}-\w{5})" );