formatting string

D

dave

Hi Guys

I have one string variable and value stores something
like this

st = "From: ""John Thomas"" <[email protected]>"

when i test it display some thing like
From: "John Thomas" <[email protected]>

How can I pick up only display name and without double
quotes. i.e. it should display only

John Thomas

Thanx for helping
dave
 
D

dlbjr

st = "From: ""John Thomas"" <[email protected]>"
Response.Write GetDisplayName(st)

'This function has a little error Checking
Function GetDisplayName(str1)
str1 = Trim(str1)
If Len(str1) > 0 Then
arData = Split(str1,"""")
GetDisplayName = arData(1)
End If
End Function

'dlbjr
'Pleading sagacious indoctrination!
 

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,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top