<?xml version="1.0" encoding="windows-1252"?>
<node id="581013" title="Re: regex help please" created="2006-10-27 16:24:44" updated="2006-10-27 12:24:44">
<type id="11">
note</type>
<author id="381608">
ikegami</author>
<data>
<field name="doctext">
From "not the second",I presume both lines are present in the variable being searched. (Previous posts assumed you were reading a line at a time.)

&lt;p&gt;The following two snippets will stop matching at the first &lt;c&gt;&lt;0a&gt;&lt;/c&gt;, not the second.

&lt;c&gt;
s/rcvtime.*?&lt;0a&gt;//;
&lt;/c&gt;

&lt;c&gt;
s/rcvtime(?:(?!&lt;0a&gt;).)*&lt;0a&gt;//;
&lt;/c&gt;
</field>
<field name="root_node">
580985</field>
<field name="parent_node">
580985</field>
</data>
</node>
