In message <[EMAIL PROTECTED]>, Hassan Ali writes: >When I am using the ORO package to find matches in a relatively big html page >(eg. amazon) it is giving me a stack overflow exception when I run it on Sun S >parcV. The problem is that the request will run properly in the windows enviro >nment. >Specifically the problem occurs when I try to read in the whole web page using > > >((?i)<html>(.*\n)*?.*?</html>) > >and then try to look for a match in the resulting buffer.
You have to either increase the stack size used by your JVM (-Xss) or rewrite your regular expression to be more efficient. From what I can tell (<html>.*</html>) compiled with CASE_INSENSITIVE_MASK | SINGLELINE_MASK will do what you want more efficiently with no recursion. I would suggest, however, that it is faster to search for <html>, record the start offset, search for </html>, record the end offset, and then copy the stuff in between than it is to have the regular expression do all of that extra matching. daniel -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
