My url will be like localhost:5557. And I will not allow http:// or https:// or ftp:// in my url.
Also I tried
^(?:!(ftp|http|https):\/\/)?([a-zA-Z0-9]+\.)?[a-zA-Z0-9][a-zA-Z0-9-]+\.[a-zA-Z]{2,6}?$
But I am getting false when adding the port number.
Any suggestions please !