<?xml version="1.0" encoding="windows-1252"?>
<node id="1005151" title="reset named capture buffer within regex" created="2012-11-22 10:47:01" updated="2012-11-22 10:47:01">
<type id="115">
perlquestion</type>
<author id="1002468">
mhgoeschl</author>
<data>
<field name="doctext">
I'm using named capture buffers within a non-scoping repeat &lt;code&gt;(?: )+&lt;/code&gt; structure where the buffer status (&lt;code&gt;&lt;mybuf&gt;&lt;/code&gt; defined ?) is tested by an if-then-else sequence, e.g.: &lt;code&gt;/(? ... (?(&lt;mybuf&gt;)(?:match something)|(?&lt;mybuf&gt;match something else)) ... )+/&lt;/code&gt;. Now, I would need to reset &lt;code&gt;&lt;mybuf&gt;&lt;/code&gt; (to undef or defined value) within the regexp WITHOUT consuming any character of my match target. Since testing the buffer is possible using &lt;code&gt;?(&lt;mybuf&gt;)&lt;/code&gt;, I'm speculating that resetting it should also be possible at runtime ? </field>
</data>
</node>
