Skip to content

Instantly share code, notes, and snippets.

@donjajo
Last active January 8, 2021 13:31
Show Gist options
  • Select an option

  • Save donjajo/7266bdcb1dec79b091a55075736303fd to your computer and use it in GitHub Desktop.

Select an option

Save donjajo/7266bdcb1dec79b091a55075736303fd to your computer and use it in GitHub Desktop.

Revisions

  1. donjajo revised this gist Jan 8, 2021. No changes.
  2. donjajo created this gist Jan 8, 2021.
    3 changes: 3 additions & 0 deletions catch.js
    Original 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_-]/) ) }