<?xml version="1.0" encoding="windows-1252"?>
<node id="1004039" title="Re: Regexp::Assemble hangs with a certain case" created="2012-11-15 11:44:15" updated="2012-11-15 11:44:15">
<type id="11">
note</type>
<author id="941867">
golux</author>
<data>
<field name="doctext">
Hi Kimmel,
&lt;p&gt;It's because in the second case, $content matches the $regex (at the same location each time), so you're never changing the condition; hence never exiting the loop.  Try changing "while" to "if", perhaps? 

&lt;div class="pmsig"&gt;&lt;div class="pmsig-941867"&gt;
&lt;center&gt;&lt;font size="-1"&gt;
&lt;font color="#ff0000"&gt;say&amp;nbsp;&lt;/font&gt;
&lt;font color="#ffbf3f"&gt;substr&lt;/font&gt;&lt;font color="#c8871a"&gt;+&lt;/font&gt;&lt;font color="#9f4f06"&gt;lc&amp;nbsp;&lt;/font&gt;&lt;font color="#711f79"&gt;crypt&lt;/font&gt;&lt;font color="black"&gt;(&lt;font color="#a9df2d"&gt;qw&amp;nbsp;&lt;/font&gt;&lt;font color="#4df9ff"&gt;$i3&amp;nbsp;&lt;/font&gt;&lt;font color="#4db2ff"&gt;SI$&lt;/font&gt;),4,5&lt;/font&gt;&lt;/font&gt;&lt;/center&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
1004038</field>
<field name="parent_node">
1004038</field>
</data>
</node>
