Boost C++ Libraries: Ticket #7225: xpressvie Symbol Tables,I want get mapped value by iterator ,not by semantic action https://svn.boost.org/trac10/ticket/7225 <p> std::map&lt; std::string, string&gt; ones_map = map_list_of("one","1")("two","2"); std::string str( "one two three"); for(sregex_token_iterator cur( str.begin(), str.end(), number_rx ); </p> <blockquote> <p> ; cur != sregex_token_iterator(); ++cur ) </p> <blockquote> <p> { </p> <blockquote> <p> std::cout &lt;&lt; *cur &lt;&lt; ' ';<strong><em>will print 1 2</em></strong><em> </em></p> </blockquote> <p> } </p> </blockquote> </blockquote> <p> or str = regex_replace( str, ones_map, "$1"); <strong>can get "1 2"</strong> or, has existed an easy way? thank you! </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7225 Trac 1.4.3 anonymous Mon, 13 Aug 2012 13:22:35 GMT <link>https://svn.boost.org/trac10/ticket/7225#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7225#comment:1</guid> <description> <p> sorry ! sregex_token_iterator should be sregex_iterator </p> </description> <category>Ticket</category> </item> </channel> </rss>