const regex = /\bVALUES\s*\((\s*(?:N'[^']*'|\w+))(?:,(?1)){12}\K,(?1)/gm;
// Alternative syntax using RegExp constructor
// const regex = new RegExp('\\bVALUES\\s*\\((\\s*(?:N\'[^\']*\'|\\w+))(?:,(?1)){12}\\K,(?1)', 'gm')
const str = `INSERT member (member, prename, name, street, postalcode, town, tel1, tel2, fax, bem, anrede, salutation, email, name2, name3, association, project) VALUES (2005, N'John', N'Doe', N'Street 4711', N'1234', N'Town', N'1234-5678', N'1234-5678', N'1234-5678', N'Leader', NULL, N'Dear Mr. Doe', N'a@b.com', N'This is the text i want to delete', N'Name2', N'Name3', NULL, NULL);\`\`\``;
const subst = `<WHATEVER_YOU_NEED>`;
// 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