Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Break a string into two variables

Status
Not open for further replies.
May 8, 2004
92
GB
Hi guys,

My own experience with VBscript is not that good.and a little problem has come up.so if any one can help me here.

i want to break a single string into two strings i.e

MyString=server.com

if this is the case then i want the VBscript function to take in MyString and return me

Var1=server
Var2=com Yes the . is the delimiter...
Also please do tell me how to use it in my ASP page.
Cheers!
 
okay i have got somewhere i did this

Split(MyString,.)

but now i dont know how to use this within my ASP page :(

should i just write

<%
dim a
a=Split(MyString,.)
response.write a(0)
response.write a(1)
%>


 
How kool is this iam solving my own problems..and thats for all day...so i did this to the above code

<%
dim a
a=Split(MyString,".") 'Only "" were missing :p
response.write a(0)
response.write a(1)
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top