const regex = /^"([\w\s()]+)<.*?(\w+)\s+(\[\w+\]\s+\(\w+\)).*$/gmu;
// Alternative syntax using RegExp constructor
// const regex = new RegExp('^"([\\w\\s()]+)<.*?(\\w+)\\s+(\\[\\w+\\]\\s+\\(\\w+\\)).*$', 'gmu')
const str = `"КРОВАТЬ<img src=""bed.png"" />" BED [bed] (бэд)[sound:43.mp3]
"ДОМ (место жилья)<img src=""home4.png"" />" HOME [həʊm] (хоум)[sound:23.mp3]
"ЗУБ<img src=""tooth2.png"" />" TOOTH [tuθ] (туθ)[sound:30.mp3]
"ЗУБЫ<img src=""teeth.png"" />" TEETH [tiːθ] (тииθ)[sound:31.mp3]
"ИГРА<img src=""game.jpg"" />" GAME [geɪm] (гейм)[sound:32.mp3]
"ЖУРНАЛ<img src=""magazine.jpg"" />" MAGAZINE [ˌmægəˈziːn] (мæгэзиин)[sound:28.mp3]
"ЖИЗНЬ<img src=""life.jpg"" />" LIFE [laɪf] (лайф)[sound:27.mp3]
"ЖЕНЩИНА<img src=""woman (1).jpg"" />" WOMAN [ˈwʊmən] (wумэн)[sound:25.mp3]
"ЖЕНЩИНЫ<img src=""women2 (1).jpg"" />" WOMEN [ˈwɪmɪn] (wимин)[sound:26.mp3]
"ЕДА<img src=""food.jpg"" />" FOOD [fuːd] (фууд)[sound:24.mp3]`;
const subst = `\L"\2";"\3";"\1"`;
// The substituted value will be contained in the result variable
const result = str.replace(regex, subst);
console.log('Substitution result: ', result);
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