Hi
I am trying to write a python script that executes a command to screen scrub results below
I will appreciate it very much if you can help me with a python script that can
pick the percentage USAGE in the second column based on the supplied queue number in the first column
import re
content = """NUMBER of Queues = 5
SYSTEM Treshold = 80%
==================================================================
QUEUE USAGE TOTAL book1 book2
------------------------------------------------------------------
0001 18% 822 481 98
0002 16% 345 765 88
0003 10% 400 300 166
0004 15% 994 322 177
0005 17% 348 297 131
---------------------------------------------------------- """
m = re.match("(0001)/(\d{%})", content)
if m:
print m.group(0)
print m.group(1)
When i run this from the command prompt nothing shows up
I was able to get this screen scrub done using php preg_match_all
but i want to do the same with the re module in python.
Please suggestions and help will be very much appreciated
Thanks