I am trying to clean up a log and I want to remove some special strings
Example:
%/h > %/h Current value over threshold value
Pg/S > Pg/S Current value over threshold value
Pg/S > Pg/S No. of pages paged in exceeds threshold
MB < MB min. avg. value over threshold value
I have tried to use some patterns but it seems not to work.
re.sub(r'\w\w\/\s>\s\w','',text)
Is there any good idea for me to remove the special pattern?
I want to remove the .../...>.../...
I expect my output to only contain useful words.
Current value over threshold value
No. of pages paged in exceeds threshold
min. avg. value over threshold value
Thank you for any idea!
>always the same? Matching^([^\s>]*)\s+>\s+\1would be my idea then.