Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
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
Please
log in
to post a comment.
hangman
rang_warnings
7
std::is_same doesn't check for calling convention
amusing overload choice
class with unique_ptr to vector
PreprocessorVsNamespace
delete from list
#7
cv4_template
stackse - search stackoverflow differently
Please log in to post a comment.