<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Courier; font-size: 12pt; color: #000000'><br>----- "DM Smith" &lt;dmsmith@crosswire.org&gt; wrote:
<br>&gt; From: "DM Smith" &lt;dmsmith@crosswire.org&gt;<br>&gt; To: "Trenton D. Adams" &lt;trent.jsword@trentonadams.ca&gt;, "J-Sword Developers Mailing List" &lt;jsword-devel@crosswire.org&gt;<br>&gt; Sent: Thursday, February 25, 2010 8:54:31 PM GMT -06:00 US/Canada Central<br>&gt; Subject: Re: [jsword-devel] regex searching<br>&gt;<br>&gt; <br>&gt; <div><br></div><div><br>&gt;See BookExporter for &nbsp;an example of iterating over the entire <br>&gt; KJV efficiently:</div><div><a href="http://www.crosswire.org/jsword/java2html/org/crosswire/jsword/bridge/BookExporter.java.html" target="_blank">http://www.crosswire.org/jsword/java2html/org/crosswire/jsword/bridge/BookExporter.java.html</a><br><br>Cool, I'm going to check it out.<br></div><div><br>&gt; The other problem with your example is that each call to <br>&gt; matches recompile the pattern. Hoist the pattern outside <br>&gt; of the loop and it should be even faster.<br><br>Oh yeah, I was just hacking something together. ;)<br></div><div><br></div><div><br></div></div></body></html>