Please Help with ASP Parsing Code

Results 1 to 3 of 3

Thread: Please Help with ASP Parsing Code

  1. #1
    Scott Miller Guest

    Default Please Help with ASP Parsing Code

    Hello, I have to write a parser in ASP to filter a large textbox entry into a database of questions and answers. Basically, an instructor will type in a test with questions and any number of multiple choice answers in a text editor, then copy and paste this text into a textbox. Once submitted from the textbox page, a parser will parse through the text and populate a database with the questions and answers for each question along with the flagged correct answer. <BR><BR>The text will be entered in this format:<BR><BR>1) What year is this?<BR><BR>a. 1980<BR>b. 1990<BR>* c. 2000 <BR>d. 2001<BR><BR>2) Next question .....<BR><BR>I know how to stick the information in the Access database I created once the questions and answers are separated, but I have never written a smart parser to handle this type of text entry.<BR>Thank you in advance for anyones help and input.<BR><BR>Scott Miller

  2. #2
    Join Date
    Dec 1969

    Default RE: Please Help with ASP Parsing Code

    if they&#039re likely to stick to the right format, just perform a Split(vbcrlf) to create an array from the textbox<BR><BR>index(0) is the question, 1 through 4 would be the answers<BR><BR>that&#039s the simple way, anyhow. You could modify it to check the first couple of characters of each array index to see if it&#039s a number or a letter...or an asterisk, using the Mid() or Left() functions<BR><BR>j

  3. #3
    Scott Miller Guest

    Default RE: Please Help with ASP Parsing Code

    Thanks for the help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts