Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
RegexReplace
//g++ 7.4.0 //RegexReplace //this code is created by Rezaul Hoque on February 19,2022;contact: jewelmrh@yahoo.com,Dhaka, Bangladesh //note: codes shared by Rezaul Hoque on rextester are not for sale; they are created and shared to facilitate the algorithm learning process; many like Hoque use this platform to practice programming ;Rezaul hopes his contribution helps others to fine tune their learning; #include <iostream> #include <string> #include <regex> #include <iterator> int main () { std::string st("\"Holistic holographic movie Hollowman was first released on a holiday in Hollywood\n\""); std::regex rg ("(\\b[hH]ol)([^ ]*)"); std::cout << std::regex_replace (st,rg,"hol$2"); std::cout << std::regex_replace (st,rg,"$1 and $2\n",std::regex_constants::format_no_copy); std::cout << std::endl; return 0; }
run
|
edit
|
history
|
help
0
Synchro#2
Base File.cpp
Graph Theory On Strings
SegTree
RegTokIt
VectorNormFn
ASHA
cppOverride
Divide
ThreadPool