<br><br><div class="gmail_quote">On Mon, Aug 1, 2011 at 1:32 PM, Lawson English <span dir="ltr">&lt;<a href="mailto:lenglish5@cox.net">lenglish5@cox.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
anyone familiar with VB-Regex package?<br>
this code should be returning an ordered collection of 25 hits (I thought). Instead it returns one long string of all 25 hits:  <a href="http://pastebin.com/eGcX6vg2" target="_blank">http://pastebin.com/eGcX6vg2</a><br>
source string: <a href="http://pastebin.com/AkyQrXGD" target="_blank">http://pastebin.com/AkyQrXGD</a><br>
I&#39;ve been playing with this one for an several hours.  I can&#39;t tell if the strings are too complicated or if I&#39;m just using the wrong syntax, though the simple example works just fine.<br>
<br>
&#39;\w+&#39; asRegex matchesIn: &#39;Now is the Time&#39; =&gt; an OrderedCollection(&#39;Now&#39; &#39;is&#39; &#39;the&#39; &#39;Time&#39;)<br>
<br><br></blockquote><div> </div></div>Perhaps it was the string size which has multiple quotes and is not all escaped. Sean DeNigris writes about an interesting trick to preserve all the quotation marks inside long strings, especially html-strings. See this post from Sean for this trick <a href="http://seandenigris.com/blog/?p=647">http://seandenigris.com/blog/?p=647</a>.<br>
 <blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div><br></div></div></blockquote>This code returns the OrderedCollection as expected by you.<br><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div><div><br></div><div>source := htmltext678 contents.</div></div><div><div>aString := &#39;&lt;a href=&quot;billionaires08_(.*)html&quot;&gt;(.*).&lt;/a&gt;&lt;/td&gt;&#39;.</div></div><div><div>matcher := RxMatcher forString: aString.</div>
<div>matcher matchesIn: source.<span class="Apple-tab-span" style="white-space:pre">                                                                        </span></div></div><div><div>&quot;Transcript show: (matcher matchesIn: source); cr.&quot;</div></div></blockquote><div><br></div>
<div><br></div><div>The htmltext678 is the TextMorph where I stored your html page and extracted the contents to preserve all inline quotes. I took a shorter match-string (aString). </div><div><br></div><div>One thing i noticed in the referred code that there was an ordered collection being created which wasn&#39;t doing anything.</div>
<div><br></div><div>Regards,<br>-- <br>Prashanth Hebbar<br><br>
</div>