Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

use regex replace in c++

#include <string>
#include <regex>

std::string test = "abc def abc def";
test = std::regex_replace(test, std::regex("def"), "klm"); // replace 'def' -> 'klm'
// test = "abc klm abc klm"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #regex #replace
ADD COMMENT
Topic
Name
9+5 =