I have an input field on the page, and I have the text written somewhere on the page: "Your desired domain is www.domainname.com." Domain name is dynamic text, every time something else. I would like to automatically fill the input field with "domainname" while tld can be anything (.com, .net, .name, ...). How can it be achieved with JavaScript or jQuery? It is not possible server-side, it has to go like this.
Use JQuery selectors to grab the inner html of the element that contains the text "Your desired domain is www.domainname.com" then perform a regex on that string to extract the domain name assign the domain name to the input text field using JQueries .val()