Last active
January 8, 2021 13:31
-
-
Save donjajo/7266bdcb1dec79b091a55075736303fd to your computer and use it in GitHub Desktop.
Revisions
-
donjajo revised this gist
Jan 8, 2021 . No changes.There are no files selected for viewing
-
donjajo created this gist
Jan 8, 2021 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ let table = document.getElementsByTagName("table") tbodies = table[2].tBodies[0].children for( let tr of tbodies ) { console.log( tr.children[0].textContent == tr.children[0].textContent.replace( /[^a-zA-Z0-9_-]/, "" ), `\nOriginal: ${tr.children[0].textContent}`, `\nSanitized: ${tr.children[0].textContent.replace( /[^a-zA-Z0-9_-]/, "" ) }`, `\nFound:`, tr.children[0].textContent.match(/[^A-Za-z0-9_-]/) ) }