<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Courier New; font-size: 10pt; color: #000000'>Nah, that does not work :( Its messing with my brain as it should be straight forward :(<br><div><span name="x"></span>-- <br>Thanks, Phil<span name="x"></span><br></div><br><hr id="zwchr"><blockquote style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><div class="WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Phil,</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Looks like you need to escape the indirections... i.e.</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">$text =~ s/\&lt;(html\S+)\&gt;(\S+)/$1$html$2/i;</span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">&nbsp;</span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">Of course this is a quick response and has not been tested ;)</span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">&nbsp;</span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">--Dave</span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black"><br><br></span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"></span></p><div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt"><div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> mailscanner-bounces@lists.mailscanner.info [mailto:mailscanner-bounces@lists.mailscanner.info] <b>On Behalf Of </b>--[ UxBoD ]--<br><b>Sent:</b> Saturday, October 22, 2011 2:01 PM<br><b>To:</b> MailScanner discussion<br><b>Subject:</b> OT: Perl Cramp</span></p></div></div><p class="MsoNormal">&nbsp;</p><div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">All, <br><br>I am trying to resolve an issue with the MailScanner and ZendTo integration around how Outlook constructs HTML emails.&nbsp; My problem is brain cramping on Perl. Here is a code snippet:<br><br>!/usr/bin/perl<br><br>my $text = "&lt;HTML 123&gt;This is a test&lt;/HTML&gt;";<br>my $html = "Add this first";<br><br>$text =~ s/(&lt;html\S+)&gt;(\S+)/$1$html$2/i;<br><br>print $text . "\n";<br><br><br>What I need to happen is that $html gets inserted before &lt;HTML 123&gt; and keep every else as it.&nbsp; Hopefully a Perl guru will put me straight!</span></p><div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">-- <br>Thanks, Phil</span></p></div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">&nbsp;</span></p></div><p class="MsoNormal"><br>-- <br>This message has been scanned for viruses and <br>dangerous content by <a href="http://www.mailscanner.info/" target="_blank"><b>MailScanner</b></a> <br>running on mail server <a href="http://www.kd0yu.com/" target="_blank"><b>KD0YU.COM</b></a>, and is believed to be clean. </p></div></div><br>-- 
<br>This message has been scanned for viruses and
<br>dangerous content by
<a href="http://www.mailscanner.info/" target="_blank"><b>MailScanner</b></a>
<br>running on mail server <a href="http://www.kd0yu.com/%22" target="_blank"><b>KD0YU.COM</b></a>, and is
believed to be clean.

<br>-- <br>MailScanner mailing list<br>mailscanner@lists.mailscanner.info<br>http://lists.mailscanner.info/mailman/listinfo/mailscanner<br><br>Before posting, read http://wiki.mailscanner.info/posting<br><br>Support MailScanner development - buy the book off the website! <br></blockquote><br></div></body></html>