Answers for "extract https from paragraph in java script"

0

javascript link detector

function URLReplacer(str){
        let match = str.match(/(b(https?|ftp|file)://[-A-Z0-9+&@#/%?=~_|!:,.;]*[-A-Z0-9+&@#/%=~_|])/ig);
        let final=str;
        match.map(url=>{
            final=final.replace(url,"<a href=""+url+"" target="_BLANK">"+url+"</a>")
        })
        return final;
      }
Posted by: Guest on October-26-2020
0

how to regex a link javascript

var urlRegex =/(b(https?|ftp|file)://[-A-Z0-9+&@#/%?=~_|!:,.;]*[-A-Z0-9+&@#/%=~_|])/ig;
Posted by: Guest on September-22-2020

Code answers related to "extract https from paragraph in java script"

Code answers related to "Javascript"

Browse Popular Code Answers by Language