Determine if value exists in string with elegance

Posted on 2004-11-13
Last Modified: 2010-04-17
I'm offering the viewer an .asp page form with a list of checkboxs to allow multi-select. On the subsequent page I want to determine which values they have selected. Easy to do with one value selected, trickier with multi-values selected.

I can daisy chain together a series of blocks of code determining regular expression pattern but it seems clunky.

I'm looking for the vbscript equivalent of the SQL IN statement.

Question by:webdork
    LVL 95

    Expert Comment

    by:Lee W, MVP
    LVL 95

    Accepted Solution

    Or I can see a reason you might want to use SPLIT with a FOR EACH loop.

    FOR EACH loop see: and look for "Iterating through a collection"

    Author Comment

    No Perhaps about it. Lovely. Thanks!

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    factorial example challenge 10 44
    countX 22 50
    VB 6.0 printer how to align 6 37
    word0 challenge 3 30
    I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
    Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now