From 1272c15a36b49758af665723e4398ead10555a20 Mon Sep 17 00:00:00 2001 From: subwaystation Date: Mon, 30 Mar 2020 14:28:17 +0200 Subject: [PATCH] added support for complex path names like '5-' or '1741.hr2' --- src/subcommand/server_main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/subcommand/server_main.cpp b/src/subcommand/server_main.cpp index b0e2b8fc..2c189e19 100644 --- a/src/subcommand/server_main.cpp +++ b/src/subcommand/server_main.cpp @@ -68,10 +68,10 @@ namespace odgi { // const char* pattern1 = R"(/(\w+)/(\d+))"; // const char* pattern1 = R"(/([a-zA-Z]*[0-9]*)/(\d+))"; - const char* pattern1 = R"(/(\w*)/(\d+))"; + const char* pattern1 = R"(/(\w*.*)/(\d+))"; std::regex regexi1 = std::regex(pattern1); std::cmatch cm1; // same as std::match_results cm; - std::regex_match ("/5-/3",cm1,regexi1); + std::regex_match ("/5-/3",cm1,regexi1); // /1741.hr2/3 std::cout << "the matches were: " << std::endl; for (unsigned i=0; i