I have below host name and i want regex for the same
127.0.0.1:8181
The input contains numbers, dot(.) and colon (:)
I used below regex, but none of them worked
^([0-9]|#|+|*)+$
^[0-9*#+]+$
Adding my code snippet below
var guidRegex = new RegExp("/[0-9.:]+/")
var hostName = "127.0.0.1:8181";
var match = guidRegex.test(hostName);
After executing the value of match is FALSE