Parse URL with VBScript

I have a URL such as http://www.mydomain.com/Bob.Jones on my Windows server.
I would like to parse out the "Bob" and "Jones" separately so I can use them on a web page.
How can I accomplish this?
dumalooAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

rg20Commented:
url = http://www.mydomain.com/Bob.Jones

array = split(url,".com/")

This will give you a 2 dimention array
http://www.mydomain
and
Bob.Jones

WordArray = Split(array(2), ".")
will give you
wordarray(0) = Bob
wordarray(1) = Jones
0
dumalooAuthor Commented:
Thanks rg20. So how do I actually write out the values to the web page with vbscript?
0
dumalooAuthor Commented:
So in the browser address bar, I have the following: http://www.mydomain.com/Bob.Jones

My vbscript code is as follows:

myURL = Request.ServerVariables("Query_String")
myURL = UCase(Mid(myURL, InStrRev(myURL, "/") + 1, Len(myURL)))
myDomain="http://www.mydomain.com/"
myNewURL=myDomain+myURL
response.write myNewURL ---->> returns http://www.mydomain.com/Bob.Jones

The array should return "Bob" and "Jones" separately. How can I write these two different values to the page?
The code errors out when I include the array stuff above.

Thanks!
0
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

rg20Commented:
ok you have bob and jonnes in myURL
myArray = split(myURL,".")
<%=myArray(0)%>
<%=myArray(1)%>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dumalooAuthor Commented:
Works now! Thanks
0
rg20Commented:
You should accept an answer and not just close the question, I done this on accident a few times
0
dumalooAuthor Commented:
This helped me arrive at the final solution.
0
rg20Commented:
Just curious what were you trying to write out, if they were attached to the URL, and you were spllitting them from the URL, how did it help you get to only a partial answer?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.