const regex = /values '\K[^']*/g;
// Alternative syntax using RegExp constructor
// const regex = new RegExp('values \'\\K[^\']*', 'g')
const str = `create database link ODSPUSH.CISCO.COM connect to XXDM identified by values '056D98F3367CAC4478383FFB673E4D22329E172F2B25778BE3' using 'TS3ODS';
conn GESADM/abcd123
create database link TS3CFN.CISCO.COM connect to GESADM identified by values '05A0E92F39E91BA002F98DE9A46FC72B31572483E12D3AAB67' using 'TS3CFN';
create database link SYNSTG.CISCO.COM connect to SYN_CLNTSRV identified by values '066C10B37E3A3D0A3AA96B9FDE063585B662E3921F3C3F5A3E224BD4394A7BD659DAD174ABDE36594E7F3B466D6B0DCF78F13D75BA3B47090D295
8F8604E637462A2A41F74458E0C0EB649EE9A537AD2AE109A20B2DA09E5F9A28D666B8980651B79C0E76BBD6CBBCD169645970FDD615291C8557DBC79F527BF32E14A845025' using 'SYNSTG'; `;
const subst = ``;
// 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