formatting string

D

dave

Hi There
I have one string variable and value is stored something
like this when I checked using
Response.write st_toadd
It displayed something like this
"John Matthew" <[email protected]>

I want to grab only email address
i.e. value between "<" and ">"
and it should give me only (e-mail address removed)

what could be the syntax??

thanx for help
dave
 
B

Bullschmidt

To get everything between the < and > in a string, perhaps try something
like this:

intFirstPos = InStr(strMyString, "<")
intFinalPos = InStr(strMyString, ">")

strEmail = Mid(strMyString, IntFirstPos + 1, intFinalPos - intFirstPos -
1)

Best regards,
J. Paul Schmidt, Classic ASP Web Designer
http://www.Bullschmidt.com
Classic ASP Design Tips, ASP Web Database Demo, ASP Bar Chart Tool...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top