<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hi all,<br>
    <br>
    I'm trying to to a substitution on a URL to lower-case the the
    protocol and host name in one regex, using variables for either side
    of the substitution:<br>
    <font color="#000099"><tt>my $url = '<a class="moz-txt-link-freetext" href="http://www.FOo.COm/wibbLE">http://www.FOo.COm/wibbLE</a>';</tt></font><br>
    <tt><font color="#000099">my $search = '^([^:]+://[^/]+)/?(.*)?$';<br>
        my $replace = '\L$1\E/$2';<br>
        print $url if </font></tt><font color="#000099"><tt>$url =~
        /$search/$replace/;</tt></font><br>
    <br>
    Sadly, the result is the literal "<b>\L$1\E/$2</b>".<br>
    <br>
    Limitation is that I don't want to use eval() (also known as /e, and
    /ee), as I don't trust the content of $replace - fine if it doesn't
    nicely do a replace, bad if the eval() does a call to unlink and
    friends. (Of course, with using eval the $replace could contain '<b>lc($1)
      . "/$2"</b>'.)<br>
    <br>
    Any ideas? <br>
    &nbsp; James<br>
    <br>
    <div class="moz-signature">-- <br>
      <strong>James Bromberger</strong><br>
      Aus Mobile: +61 422 166 708<br>
      Email: james <i>_AT_</i> rcpt.to, Web: <a
        href="http://www.james.rcpt.to/">www.james.rcpt.to</a><br>
      MSN: james<i>_AT_</i>rcpt.to, AIM: JamesEBromberger, Skype:
      james.bromberger
      <small>(<i>_AT_</i> -&gt; @)</small></div>
  </body>
</html>