Forum Moderators: open

Message Too Old, No Replies

searching for string in a text file

using asp

         

markfox

12:09 pm on Aug 14, 2004 (gmt 0)

10+ Year Member



hello

i have a text file that has a list of data on each new line, can someone tell me how i can use asp to search the text file and see if a line contains the data "6674" if it does then it should do a response.write saying match found if not then match not found.

thank you

aspdaddy

6:04 pm on Aug 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can read the file into a variable with the ReadAll method of the the textstream object and then use vbScript instr() to search for text.

HTH