const regex = /(?<=kili[+])([0-9,a-z:]*)/g;
// Alternative syntax using RegExp constructor
// const regex = new RegExp('(?<=kili[+])([0-9,a-z:]*)', 'g')
const str = `[19608:16328:1102/113918.888:INFO:CONSOLE(70)] "[object Object]", source: chrome-extension://mnlhjepbejgption.js (70)
[19608:16328:1102/113918.974:INFO:CONSOLE(70)] "3ce9326dbf418abd3e7b6c2053fb33f3f932c0d24464b255e465174e2ba4227e4d28c2ad438b8a8e1d493aac5409c160", source: chrome-extension://mknljjcgepbejgnpkhjjobco/content_kepion.js (70)
[19608:16328:1102/113918.974:INFO:CONSOLE(70)] "Output", source: chrome-extension://mknljjcgnciabejgnpkhjjobco/contption.js (70)
[19608:16328:1102/113918.974:INFO:CONSOLE(70)] "df1270d17e4d9b7e5850cf", source: chrome-extension:jepbejgpjjobco/content_kion.js (70)
[19608:16328:1102/113918.992:INFO:CONSOLE(172)] "kili+14a3f1a9a023373f886ca2ff1f66294c:ac76bc99a93f5d849796e001208dd920", source: https://www.rndors-2a5le.js (172)
[19608:16328:1102/113919.520:INFO:CONSOLE(172)] "KeyStatusesChangeEvent", source: https://www.rtdors-2a5ndle.js (172)
[19608:16328:1102/113919.520:INFO:CONSOLE(172)] "[object Event]", source: https://www.tlvend0edle.js (172)
[19608:16328:1102/113919.520:INFO:CONSOLE(172)] "null", source: https://www.rtvendors-2ade52.bunde.js (172)
[19608:16328:1102/113919.520:INFO:CONSOLE(172)] "usable", source: https://www.rmhndors-2a5e52.budle.js (172)`;
// Reset `lastIndex` if this regex is defined globally
// regex.lastIndex = 0;
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}`);
});
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for JavaScript, please visit: https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions