+ 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 RĂ©ponses
+ 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