I am new to Python.
I have a string printing a table(and its contents) just like the following
Name At time Last Inter\ Max Logfile Location Status
time val log
(mins) files
------------ ------- ----- ------ ------ ------------------------------ -------
foo1 now 16:00 60 100 flash:/schedule/foo1/ Job
under
progress
foo2 now - 60 100 - Waiting
tech-support now 16:00 60 100 flash:/schedule/tech-support/ Job
under
progress
I need to find how many times the string "Job under progress" is present in the table. I tried len( re.findall( pattern, string ) ) and len( re.findall("(?=%s)" % pattern, string) ) but none of them seem to work.
Any better suggestions?
Job under progress(in one line), rather than broken up in three lines as in your example?