How to check boost regex pattern is safe?

D.D.K-2637
966
Reputation points
Hi,
I'm using following code to split this wstring:
std::wstring inputString{L"#Err | NUM | ABC..."};
boost::algorithm::split_regex(parts, inputString, boost::wregex(L"|"));
This code runs without returning results.
I can't end this loop.
Is there a way to check or stop them in case the user put the wrong pattern?
Developer technologies C++
3,971 questions
Sign in to answer