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
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|