Try running the code through the perl debugger perl -d to see where it really gets stuck at.
use strict; use warnings; use Data::Dumper; my @images; my $content = '<a href="http://www.imagebeaver.com/view.php?mode=galle +ry&g=115564&photo=1" target="_blank"><img src="http://www.imagebeaver +.com/files/images/thumb/37021412066526319.jpg" border="0"></a> <a hre +f="http://www.imagebeaver.com/view.php?mode=gallery&g=115564&photo=2" + target="_blank"><img src="http://www.imagebeaver.com/files/images/th +umb/99821412066526320.jpg" border="0"></a> <a href="http://www.imageb +eaver.com/view.php?mode=gallery&g=115564&photo=3" target="_blank"><im +g src="http://www.imagebeaver.com/files/images/thumb/6234141206652632 +1.jpg" border="0"></a> <a href="http://www.imagebeaver.com/view.php?m +ode=gallery&g=115564&photo=4" target="_blank"><img src="http://www.im +agebeaver.com/files/images/thumb/33641412066526322.jpg" border="0"></ +a> <a href="http://www.imagebeaver.com/view.php?mode=gallery&g=115564 +&photo=5" target="_blank"><img src="http://www.imagebeaver.com/files/ +images/thumb/5361412066526323.jpg" border="0"></a> <a '; push(@images, "http://www.imagebeaver.com/files/images/$1:$1") while $ +content =~ m#/files/images/thumb/([a-zA-Z0-9]+\.jpg)#g; print Dumper \@images;
| 1)Gain XP 2)??? 3)Profit |
In reply to Re: regex hangs forever
by grep
in thread regex hangs forever
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |