Created
July 20, 2021 23:51
-
-
Save tomasswood/98314e8ced48c9a274e78a012b1962e7 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
let r = /(\w{2,4}-\d+)/gm; | |
let t = Array.from(document.getElementsByClassName('subject')).reduce((acc, node) => { | |
const match = node.innerText.match(r); | |
if (match && match.length > 0) { | |
return acc.add(...match.map((m) => m.toUpperCase())) | |
} | |
return acc; | |
}, new Set()); | |
console.log([...t].sort().join("\n")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment