Jasper Yu says to YSITD
const regex = /\[(\d+:\d+\.\d+)\]/gm; const str = `[03:45.54][03:15.94]本当のキミを 知りたいの`; 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}`); }); }