Created
October 19, 2022 20:33
-
-
Save PlethoraChutney/4e9237187a99427a867974fba567af8d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import re | |
import sys | |
char_pattern = re.compile('color:#7f7f7f[^>]*>([^<]*)') | |
with open(sys.argv[1], 'r') as f: | |
lines = [x.rstrip() for x in f] | |
line = ''.join(lines) | |
match = re.findall(char_pattern, line) | |
print(''.join([x.upper() for x in match]).replace(' ', '')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment