Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Regex failure
#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-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
123
rvalue lifetime
infix to postfix v 3.0 with improved eval()
list multiply
VS struct_member_name
MSVC_example_fscanf_s_and_chars_wchars
default
students grade
Overload resolve function pointer
Dynamically sized array at end of struct