+ 2
Search for a word (up or down) that occurs after ifAdminStatus.
After I ran my python script I’m trying to search for a specific string in the data that looks like (‘ifAdminStatus’: ‘up’) or (‘ifAdminStatus’: ‘down’). Print out the up and down part in a file but I’m having a hard time searching for it since this occurs 100 times in the script.
2 Respuestas
+ 4
Regular expression can do a trick. Read line by line, evaluate against re and then append value to list.
0
yes i have tried that but I’m confused on how to do it because the data is so in a file and its just the data from the script I ran