How to replace image url

Hello Developer,
I am trying to replace my current image src by another src.
here is my current image src <p><img src="blob:"></p><react-component count="" editable="true"></react-component><p> </p>
I want to replace it by another link , here is what I have implemented
editor .getHTML() .match(/<img [^>]*src="[^"]*"[^>]*>/gm) .map((x) => x.replace(/.*src="${}".*/, "$1") ); is coming from my REST API result. and editor.getHTML() return HTML code.

Do you have a link to the site/code of what you are trying to accomplish?