I'm currently validating if a string is a valid regex string by using a try, catch. I'd like to instead preferably do this without a try, catch, and some sort of bool returning function.
Are there any options? (minimal version using the std)
Example using try, catch:
std::wstring regex;
try {
wregex re(regex);
}
catch (const std::regex_error& ) {
}