Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > formatting string

Reply
Thread Tools

formatting string

 
 
dave
Guest
Posts: n/a
 
      07-14-2004
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" <(E-Mail Removed)>

I want to grab only email address
i.e. value between "<" and ">"
and it should give me only http://www.velocityreviews.com/forums/(E-Mail Removed)

what could be the syntax??

thanx for help
dave
 
Reply With Quote
 
 
 
 
Bullschmidt
Guest
Posts: n/a
 
      07-14-2004
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...


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
dave
Guest
Posts: n/a
 
      07-14-2004
thanx

>-----Original Message-----
>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...
>
>
>*** Sent via Developersdex http://www.developersdex.com

***
>Don't just participate in USENET...get rewarded for it!
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
String concatenation vs. string formatting Andrew Berg Python 13 07-10-2011 11:24 PM
String formatting with the format string syntax Andre Alexander Bell Python 9 09-15-2010 10:35 AM
Re: Formatting String in Datagrid Steve Hoyer ASP .Net 2 04-15-2004 04:28 PM
Need formatting options menu for formatting hard drive Mark T. Computer Support 3 11-24-2003 11:50 PM
Re: Formatting string in WHERE clause Lee Simpson ASP .Net 0 07-18-2003 04:21 PM



Advertisments