sample ãµã³ãã«ã®åä½ç¢ºèªãã¼ã¸ã§ã³ [GCC4.4/1.41.0] [VC9/1.41.0] #include <iostream> #include <string> #include <boost/regex.hpp> using namespace std; int main() { // <ã§å§ã¾ã£ã¦>ã§çµããæååã«ãããããæ£è¦è¡¨ç¾ã§æ¤ç´¢ boost::regex r( "<[^>]+>" ); boost::smatch m; string str1 = "The HTML tag <title> means that ..."; if( boost::regex_search(str1, m, r) ) { cout << "found (pos=" << m.position() << ")" << endl; cout << " ==> " << m.str()
{{#tags}}- {{label}}
{{/tags}}