I'm trying to replace %username%
with any name inputted. I wanna replace that keeping the end part of the entire string %username%, your Account Has Been Successfully Created!
<h2 class="done">%username%, your Account Has Been Successfully Created!</h2>
let name = $(".done");
name.text().replace(/\%(.+?)\%/, this.value);
this.value
is just the username inputted in the input field.