Boost C++ Libraries: Ticket #519: Problems in regex in MS Visual Studio.NET 2005 https://svn.boost.org/trac10/ticket/519 <pre class="wiki">When I try to run this code: #include "stdafx.h" #define BOOST_REGEX_MATCH_EXTRA #include &lt;boost\regex.hpp&gt; int _tmain(int argc, _TCHAR* argv[]) { boost::regex re( "^(?:(.+?),)*(.+?)$" ); boost::cmatch matches; if( boost::regex_match( "hello", matches, re ) ) { for( boost::cmatch::iterator pos = matches.begin() + 1; pos != matches.end(); pos++ ) { } return 1; } return 0; } compiled by Visual Studio.NET 2005, assertion will be failed at boost_1_33_1_beta\boost/regex/v4/match_results.hpp, line 282 (Assertion failed: pos+2 &lt; m_subs.size()). If I undefine BOOST_REGEX_MATCH_EXTRA, then all is OK. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/519 Trac 1.4.3 John Maddock Sun, 20 Nov 2005 10:32:56 GMT status changed https://svn.boost.org/trac10/ticket/519#comment:1 https://svn.boost.org/trac10/ticket/519#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> <pre class="wiki">Logged In: YES user_id=14804 If you want to use extended capture information then you have to build the regex lib with BOOST_REGEX_MATCH_EXTRA defined. I suggest you define it in boost/regex/user.hpp. If you do that then your example runs as expected. John Maddock </pre> Ticket