Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Regex success
#include <iostream> #include <regex> #include <string> int main() { std::string str = "Got event %s (%d) in state %s (%d), moving to state %s (%d)"; std::regex r = std::regex("^([^%]|%(\\.[0-9]+)?[a-zA-Z])*$", std::regex::extended); try { if (std::regex_match(str, r)) std::cout << "matched\n"; else std::cout << "not matched\n"; } catch (std::regex_error& rex) { std::cout << "Oops: " << rex.what() << "\n"; } return 0; }
run
|
edit
|
history
|
help
0
Additional layer of indirection
make Derive final
sharedptr emptiness
Implements.cpp
unresolved external symbol
hangman
ambiguity does not count as ambiguity
MSVC-IsBaseOf
PreprocessorVsNamespace
Template function declaration to avoid usage of template in T::template f<int>()