JSFiddle - React, Tailwind, and code Playground

by rsm23

JavaScript

var string = "http://nas.urbantaktiks.com:30000/rseif/testproj.git";

var urlregex = /^(?:https?:\/\/)?/gi;
var tempurl = string.replace(urlregex, '').split('/')[0];

console.log(tempurl)