On Tue, Sep 19, 2000 at 04:33:51PM -0700, Karl Dahlke wrote: > The following perl program hangs when it evaluates the regexp. > > # Sample html text from www.spacescience.com. > # Note that a quote is missing, which really throws things off. > # Still, it shouldn't cause the regexp machinery to hang. > $buffer = ' > <IMG SRC="headlines/images/harvestmoon/frontpage.gif" ALIGN="RIGHT" > hspace="4 width=" 120" HEIGHT="99" BORDER="2" WIDTH="120" NATURALSIZEFLAG="1"></A>'; > > # Break the text up into html tags. > print "Pre regexp\n"; > $buffer =~ s/< # start the tag > (\/?) # leading slash turns off the tag > ([a-zA-Z]+) # name of the tag > (([^>"']+ # unquoted stuff inside the tag > |"[^"]*" # stuff in double quotes > |'[^']*' # stuff in single quotes > )*)> # as many of these chunks as you need > /tag/xsg; > > print "Post regexp\n"; # never gets here > > __END__ Whatever the bug is, it is fixed in perl 5.6.0. AbigailThread Previous