Created
April 23, 2018 21:45
-
-
Save sanishan/89c6920f8dbebeee06bb7a77b5d80a94 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
const regex = /\.profile_view_img_(.*?) { background-image: url\('https:\/\/www\.like4like\.org\/img\/(.*?)'\);/g; | |
const str = document.body.innerHTML; | |
let m; | |
while ((m = regex.exec(str)) !== null) { | |
// This is necessary to avoid infinite loops with zero-width matches | |
if (m.index === regex.lastIndex) { | |
regex.lastIndex++; | |
} | |
// The result can be accessed through the `m`-variable. | |
m.forEach((match, groupIndex) => { | |
console.log(`Found match, group ${groupIndex}: ${match}`); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment