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?
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,970 questions
Sign in to answer