It's because in the second case, $content matches the $regex (at the same location each time), so you're never changing the condition; hence never exiting the loop. Try changing "while" to "if", perhaps?
In reply to Re: Regexp::Assemble hangs with a certain case
by golux
in thread Regexp::Assemble hangs with a certain case
by kimmel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |