formatting string

Discussion in 'ASP General' started by dave, Jul 16, 2004.

  1. dave

    dave Guest

    Hi Guys

    I have one string variable and value stores something
    like this

    st = "From: ""John Thomas"" <>"

    when i test it display some thing like
    From: "John Thomas" <>

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

    John Thomas

    Thanx for helping
    dave, Jul 16, 2004
    1. Advertisements

  2. dave

    dlbjr Guest

    st = "From: ""John Thomas"" <>"
    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

    'Pleading sagacious indoctrination!
    dlbjr, Jul 16, 2004
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.