Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Need help in VB Script:Check for a specific pattern in a text file

$
0
0

Hey Scripting Guy,

I have a text file as input to my script.This text contains log details  of a job that runs daily.This job runs successfully if 17 steps are completed with "Result: *Ok*" as can be seen below.

2013-07-04 22:07:14,656 INFO    Step 16 - [Model] RatingIndices 
2013-07-04 22:07:14,812 INFO  Result: *Ok*
2013-07-04 22:07:14,812 INFO    Step 17 - [Model] UpdateDatabasePricingStatistics 
2013-07-04 22:07:31,734 INFO  Result: *Ok*
2013-07-04 22:07:31,734 INFO  Run completed. (Warning: 0 Error: 1 Fatal: 0)
2013-07-04 22:07:31,734 INFO  Spectrum Model run completed. (Messages - Information: 25 Warning: 0 Error: 1 Fatal: 0)

I need to go through each line in the file and check whether "Result: *Ok* is present 17 times for the current date.Please help me how to check that pattern highlighted above in bold.

Regards,

Remya


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>