I am using Autolinker.js to linkify text inputted from a form, but I would like to exclude example.com
from being linked.
var formInput = "Don't link example.com but link google.com and www.kbb.com please";
var linkedText = Autolinker.link(formInput);
naturally yields linkedText
having both urls linkified. I tried changing the url options using
var options = {urls: { schemeMatches: true, wwwMatches: true, tldMatches: false }};
var linkedText = Autolinker.link(formInput, options);
but this eliminates the link on google.com
as well as the example.com
while leaving www.kbb.com
linked.
Basically I just want to exclude a single specific url, namely example.com
, from being linked.