Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Regex pipe and tabs c++
//Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x86 #include <iostream> #include <string> #include <regex> #include <iomanip> int main () { const std::string rna = "|\t1\t|\t-165.256\t|" ; std::cout << "rna: " << std::quoted(rna) << '\n' ; const std::regex re( "[:punct:][:blank:]([:digit:]+)[:blank:][:punct:][:blank:]([+-]?[:digit:]+.[:digit:]+)[:blank:][:punct:]" ) ; std::smatch match ; if( std::regex_match( rna, match, re ) ) { std::cout << "ok" <<std::endl; } else std::cout << "invalid rna or no start-stop sequence\n" ; }
run
|
edit
|
history
|
help
0
Project
atoi on hex
#26
C++ string format
sinem çalışma
C++ exception
Computing factorial of an integer with recursion and iteration
problem_binary_4
MSVC lambda bug
#9