in reply to Re: Eugh, regex :(
in thread Eugh, regex :(

Hi,

Thanks for the reply :) Although your example works (all tested out fine), I still can't get it going in my script :(

print STDERR qq|\n\n---------------------------OLD post was: $ +post_message\n\n---------------------------|; $post_message =~ s|\Q[URL=\E([^]]+)\Q][IMG]\E([^]]+)\Q[/IMG][/ +URL]\E|$2|sig; print STDERR qq|\n\n---------------------------new post was: $ +post_message\n\n---------------------------|; <code> <br /><br /> All that does, is print out: <br /><br /> <code>---------------------------OLD post was: sdfsdfsdfsdf [img]http://images.voyageforum.org/photos/thumbs/0/73780-04_34_2---com +puter-keyboard_web.jpg[/img] [URL=http://img207.imageshack.us/my.php?image=dsc03598vt7.jpg][IMG=htt +p://img207.imageshack.us/img207/2964/dsc03598vt7.jpg][/IMG][/URL] [signature] --------------------------- ---------------------------new post was: sdfsdfsdfsdf [img]http://images.voyageforum.org/photos/thumbs/0/73780-04_34_2---com +puter-keyboard_web.jpg[/img] [URL=http://img207.imageshack.us/my.php?image=dsc03598vt7.jpg][IMG=htt +p://img207.imageshack.us/img207/2964/dsc03598vt7.jpg][/IMG][/URL] [signature] ---------------------------


(as you can see, it hasn't been edited at all :()

Any more ideas? Otherwise, just gonna call it quits with this til after I get back from vacation - maybe looking at it with fresh eyes will reveal something :/

TIA

Andy

Replies are listed 'Best First'.
Re^3: Eugh, regex :(
by Anonymous Monk on Mar 26, 2009 at 03:54 UTC