_assets/js/external-links.js
// returns null if string pattern is not a domain
returns null if string pattern is not a domain
returns null if string pattern is not a domain
function matchDomain(href) {
    const hrefDomain = href.match(/^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/?\n]+)/g);
    if (!hrefDomain) return null;
    return hrefDomain[0];
  }
function matchDomain ( href ) { const hrefDomain = href . match ( / ^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/?\n]+) / g ) ; if ( ! hrefDomain ) return null ; return hrefDomain [ 0 ] ; }
returns null if string pattern is not a domain
returns null if string pattern is not a domain