Answers for "get twitter username from string javascript"

4

get twitter username from string javascript

function HandleToUrl(text){
    var urlRegex = /([@]).*/g;
    return text.replace(urlRegex, function (name) {
        console.log(name)
        return '<a class="text-blurple" target="_blank" href="https://twitter.com/' + name + '">' + name + '</a>';
    })
}
Posted by: Guest on October-03-2021

Code answers related to "get twitter username from string javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language