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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to break one string in two

Status
Not open for further replies.

QueenP

Programmer
Oct 22, 2002
16
BR
I'm looking for something that separates one string with a ! in the middle (ie. 1020!Analyst) and separates everything before the !, with ! included because the value that I really need is Analyst.

Or if it's easier, how do I get what is written in a combobox between <OPTION></OPTION>?? I don't need the value.

Thank you.
 
myStr = &quot;1020!Analyst&quot;
excPos = myStr.indexOf(&quot;!&quot;)
ansStr = myStr.substr(excPos+1)
-- Just trying to help... LOL [ponder]
 
Hi QueenP,
Try using Split function which will help you to split string based on some character like &quot;!&quot;.I am soory I just cannot recollect the sysntax but you will find it on any search engine.Hope this works well
Regards
Tush

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top