Boost C++ Libraries: Ticket #3321: Boost::regex throws invalid execption when assigning match text https://svn.boost.org/trac10/ticket/3321 <p> Boost::regex::assign throws an exception on "[A-Za-z_:,=\t\{\[\]\}]" when it should not. The offending text within the text(heh) is "[<a class="missing wiki">SomeMatchText</a>\{\[\]\}]<a class="missing wiki">SomeMatchText</a>]". It does not matter where in the text "\{\[\]\}" is located it will always throw an exception if provided in that order. </p> <p> However, if you do "[\}<a class="missing wiki">SomeMatchText</a>\{\[\]]" it will not throw an exception. I haven't tried other split combinations. </p> <p> This bug was noticed in version 1.38, the changelogs do not seem to indicate this bug being fixed. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3321 Trac 1.4.3 anonymous Fri, 07 Aug 2009 11:21:32 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3321#comment:1 https://svn.boost.org/trac10/ticket/3321#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">worksforme</span> </li> </ul> <p> Works for me, note that the escapes need to be doubled up if the string is embedded in the source file. For example: </p> <blockquote> <p> boost::regex e("[A-Za-z_:,=\\t\\{\\[\\]<br />}]"); </p> </blockquote> <p> Remember that the compiler gobbles up the first escape. </p> <p> Please reopen if you have a test case. </p> Ticket