JSFiddle - React, Tailwind, and code Playground

by srakesh

JavaScript

var subUrlSTR = "http://subdomain.stackoverflow.com";
var urlSTR = "http://stackoverflow.com";
var result = /http:\/\/[A-Za-z0-9\.-]{3,}\.[A-Za-z]{3}/;
alert(subUrlSTR.match(result));
alert(urlSTR.match(result));