TString tstr = "Hello World!"; const char* cstr = tstr.c_str(); printf("String: %s", cstr);
TString tstr = "The quick brown fox jumped over the lazy dog"; std::regex regex("[a-m]+"); std::match_resultsThis code would print "Match: hequic" to the console. Package library: ROOT (CERN)results; std::regex_search(tstr.c_str(), results, regex); const char* match = results[0].str().c_str(); printf("Match: %s", match);