Parse Script

Discussion in 'ASP General' started by HartSA, Mar 15, 2005.

  1. HartSA

    HartSA Guest

    I don't even know where to start with this. I am new to ASP. I have this
    string

    SRSW1023;2UA4;HP;786B2;cv492;

    I would like to see four separate strings
    CN = SRSW1023
    SN = 2UA4
    Model = HP
    BIOS = 786B2
    User = cv492

    Lengths will vary on each record, but " ; " is the common delimiter
    HartSA, Mar 15, 2005
    #1
    1. Advertising

  2. HartSA

    Steven Burn Guest

    TheString = "SRSW1023;2UA4;HP;786B2;cv492;"
    sTemp = Split(TheString, ";")
    For x = LBound(sTemp) To UBound(sTemp)
    Response.Write sTemp & "<br>"
    Next

    or to be more precise

    TheString = "SRSW1023;2UA4;HP;786B2;cv492;"
    sTemp = Split(TheString, ";")
    CN = sTemp(0)
    SN = sTemp(1)
    Model = sTemp(2)
    BIOS = sTemp(3)
    User = sTemp(4)

    --
    Regards

    Steven Burn
    Ur I.T. Mate Group
    www.it-mate.co.uk

    Keeping it FREE!

    "HartSA" <> wrote in message news:...
    > I don't even know where to start with this. I am new to ASP. I have this
    > string
    >
    > SRSW1023;2UA4;HP;786B2;cv492;
    >
    > I would like to see four separate strings
    > CN = SRSW1023
    > SN = 2UA4
    > Model = HP
    > BIOS = 786B2
    > User = cv492
    >
    > Lengths will vary on each record, but " ; " is the common delimiter
    >
    >
    Steven Burn, Mar 15, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Susanne
    Replies:
    2
    Views:
    345
    Susanne
    Dec 10, 2003
  2. Replies:
    19
    Views:
    1,091
    Daniel Vallstrom
    Mar 15, 2005
  3. Rajat
    Replies:
    3
    Views:
    673
    Jorgen Grahn
    Jan 8, 2010
  4. VYAS ASHISH M-NTB837
    Replies:
    2
    Views:
    528
    Jan Kaliszewski
    Jan 7, 2010
  5. 7stud --

    optparse: parse v. parse! ??

    7stud --, Feb 20, 2008, in forum: Ruby
    Replies:
    3
    Views:
    168
    7stud --
    Feb 20, 2008
Loading...

Share This Page