Boost C++ Libraries: Ticket #7197: Access regex_id from semantic action https://svn.boost.org/trac10/ticket/7197 <p> It would be useful to be able to access from a semantic action the regex_id of the regex to which the semantic action belongs. </p> <p> I propose a special symbol named _regex_id_ for this purpose. </p> <p> Examples: </p> <pre class="wiki">sregex rx = xpr[cout &lt;&lt; _regex_id_]; regex_match(str, rx); // prints rx.regex_id() on success </pre><pre class="wiki">sregex sub = xpr[cout &lt;&lt; _regex_id_]; sregex rx = sub &gt;&gt; another_xpr; regex_match(str, rx); // prints sub.regex_id() on success (not rx.regex_id()) </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7197 Trac 1.4.3