Fastest way to find strings in a file

后端 未结 5 1395
耶瑟儿~
耶瑟儿~ 2021-01-18 23:04

I have a log file that is not more than 10KB (File size can go up to 2 MB max) and I want to find if atleast one group of these strings occurs in the files. These strings w

5条回答
  •  旧时难觅i
    2021-01-18 23:22

    Take a look at How to Read Text From a File. You might also want to take a look at the String.Contains() method.

    Basically you will loop through all the files. For each file read line-by-line and see if any of the lines contains 1 of your special "Sections".

提交回复
热议问题