<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 25/10/2010 07:54, Neil Hunt wrote:
<blockquote
cite="mid:AANLkTi=xzf-t7iTcPz2Kx35rtxpaiQs1mbY0x+_1tmT6@mail.gmail.com"
type="cite">You can pull out the match (i.e. $1) and pass it
through a tr, which should achieve your goal.<br>
Something like the following does what you're asking:<br>
<br>
my $url = "<a moz-do-not-send="true"
href="http://www.FOo.COm/wibbLE">http://www.FOo.COm/wibbLE</a>";<br>
$url =~ m|(\w+)://([^/:]+)(:\d+)?/(.*)|;<br>
my $protocol = $1;<br>
my $domainName = $2;<br>
$uri= $4;<br>
$domainName=~tr/A-Z/a-z/;<br>
<br>
Note that a ' does not cause it's contents to be interpolated, you
need to use ".<br>
</blockquote>
<br>
Thanks Neil,<br>
<br>
I hadn't through to use TR (face, palm); I was pulling a set of
"search" and "replace" patterns from a database, and trying to use
them all generically ALL as a substitution, with this one special
case of a case change. Its the only time I can see a use for \[LlUu]
in place of lc(), uc(), etc....<br>
<br>
<br>
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> -> @)</small></div>
</body>
</html>