-
-
Save LeBaux/7e48156617beb90e47db69868519d662 to your computer and use it in GitHub Desktop.
Parse keywords from URL
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 url = "https://www.amazon.com/SanDisk-128GB-microSDXC-Memory-Adapter/dp/B073JYC4XM/"; | |
let kwparse = (url.replace('https://','').replace('http://','').replace('www','').replace('com','').split('-').join().split('/').join().split('.')).join(',').replace(/^,/, '') | |
let kwuniq = [...new Set(kwparse.split(','))].filter(function(e){return e}); | |
console.log(kwuniq) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment