I need a robust RegExp that validates URL with port or IP with PORT e.g
http://123.456.78.900:4200 > true
http://something:4200 > true
I searched but didn't find an expression that checks both
isUrlValid(input) {
const regex = '^((https:|http:|[/][/]|www.)([a-z]|[A-Z]|[:0-9]|[/.])*)$';
const url = new RegExp(regex, 'g');
return url.test(input);
}