You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With regex [a-e the error message is wrong, referencing unbalanced parenthesis, instead of unmatched [
Error message : Found a closing ) with no corresponding opening parenthesis. The error occurred while parsing the regular expression: '[a-e>>>HERE>>>'. at 4
Windows Platform, using gcc 11.2 and boost 1.77
With regex [a-e the error message is wrong, referencing unbalanced parenthesis, instead of unmatched [
Error message : Found a closing ) with no corresponding opening parenthesis. The error occurred while parsing the regular expression: '[a-e>>>HERE>>>'. at 4
`#include <boost/regex.hpp>
#include
#include
int main()
{
std::string s = "Boost Libraries Test";
try
{
// regex contains error : missing ]
boost::regex expr{"[a-e"};
boost::smatch what;
if (boost::regex_search(s, what, expr))
std::cout << "Found !" << '\n';
else
std::cout << "Nothing !" << '\n';
}
catch(boost::regex_error& ex)
{
std::cout << ex.what() << " at " << ex.position() << "\n";
}
}`
The text was updated successfully, but these errors were encountered: