http://qs321.pair.com?node_id=753064

ultranerds has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I'm trying to get this regex working :/

Sample value of $post_message is:

[URL=http://img207.imageshack.us/my.php?image=dsc03598vt7.jpg][IMG]http://img207.imageshack.us/img207/2964/dsc03598vt7.jpg[/IMG][/URL]

(plus other images, and more content too)

The regex I have is:

$post_message =~ s%\Q[URL=\E([\?\%\:\/a-zA-Z0-9_\-\.]+)\Q][img]\E([\?\%\:\/a-zA-Z0-9_\-\.]+)\Q[/img][/URL]\E%gix;

..but I keep getting this error :

Backslash found where operator expected at /var/home/domain/domain.com +/www/admin/Plugins/GForum/Post_post.pm line 283, near "while ($post_m +essage =~ m%\" (Might be a runaway multi-line %% string starting on line 278) (Do you need to predeclare while?) Backslash found where operator expected at /var/home/domain/domain.com +/www/admin/Plugins/GForum/Post_post.pm line 283, near "img\"


Anyone got any suggestions? I'm all out of ideas :(

TIA!

Andy