in reply to Re: Why this simple regex freeze my computer? (backtracking)
in thread Why this simple regex freeze my computer?

++Nice explanation, and another reason why you shouldn't use regexes to parse HTML. One single error (or one single change in the html) can freeze your box and spoil your carefully crafted regex. As matija very succinctly said,
By the time you've resolved all those problems, you've written the better part of a HTML parser.

Of course you learn a lot trying ;-)

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
  • Comment on Re^2: Why this simple regex freeze my computer? (backtracking)