Looking for a JavaScript regex pattern that will replace all instances of {{variableName}} with the corresponding JavaScript variable placeholders in a given string, such as ${variableName}.
let str = 'Lorem ipsum dolor {{variable1}}, sit amet consectetur {{otherVaraible}} elit. Iure facilis quaerat obcaecati tempore {{variable2}} praesentium, nisi culpa vero';
Desired Output:
let str = 'Lorem ipsum dolor ${variable1}, sit amet consectetur ${otherVaraible} elit. Iure facilis quaerat obcaecati tempore ${variable2} praesentium, nisi culpa vero';
Thank you!