Roland
Sun Feb 05 05:57:52 CST 2006
"McKirahan" wrote in message
news:p5GdnZC-vogNZ37enZ2dnUVZ_s6dnZ2d@comcast.com...
: "Christopher Brandsdal" <christopher@valdres.no> wrote in message
: news:eKx4pfRKGHA.1028@TK2MSFTNGP11.phx.gbl...
: > Hi!
: >
: > I guess this is easy, but I ask anyway :)
: >
: > How can I cut 'www.' and '.no' or '.com' from a string?
: >
: > example input:
: >
: > www.norway.no
: > www.somewhere.com
: >
: > I want this output:
: >
: > norway
: > somewhere
: >
: > How can I do this?
:
: <%
: Dim arrURL
: Dim strURL
: strURL = "www.norway.no"
: arrURL = Split(strURL,".")
: Response.Write arrURL(1)
: %>
function justTheBeef(url)
justTheBeef = split(url,".")(1)
end function
Response.Write justTheBeef("www.norway.no")
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center -
http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation -
http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library -
http://msdn.microsoft.com/library/default.asp