Here
I am checking the URL with the following line, which should be either http / https or the ip address along with the request line and another bracket of square brackets [].
I want to prevent the following URL bracket
2) http://192.0.0.0/b4d2f30f-d617-403a-bb2f-dec755d01192 ? [publisher[client_id]Id] - Not Allowed
What should be a regular expression to prevent [publisher[client_id]Id] sting?
I use the following regex for the above lines
var regex = /(http|https):\/\/(\w+:{0,1}\w*)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%!\-\/]))?/; if(!regex .test(str)) { return false; } else { return true; }
What needs to be changed for this code?
Please help me for the same.
source share