Install
sudo apt-get install libboost-dev
Example
#include <iostream>
#include <string>
#include "boost/regex.hpp"
int main() {
boost::regex reg("(Colo)(u)(r)",
boost::regex::icase|boost::regex::perl);
std::string s="Colour, colours, color, colourize";
s=boost::regex_replace(s,reg,"$1$3");
std::cout << s;
}
save it to re.cpp
g++ -o re re.cpp lboost_regex
./re
Color, colors, color, colorize
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。