<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" <dmsmith@crosswire.org> wrote:
<br>> From: "DM Smith" <dmsmith@crosswire.org><br>> To: "Trenton D. Adams" <trent.jsword@trentonadams.ca>, "J-Sword Developers Mailing List" <jsword-devel@crosswire.org><br>> Sent: Thursday, February 25, 2010 8:54:31 PM GMT -06:00 US/Canada Central<br>> Subject: Re: [jsword-devel] regex searching<br>><br>> <br>> <div><br></div><div><br>>See BookExporter for an example of iterating over the entire <br>> 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>> The other problem with your example is that each call to <br>> matches recompile the pattern. Hoist the pattern outside <br>> 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>