hi i have this regex that finds ip and port ie.121.121.121.121:0000; in a string
"\\d{1,3}(?:\\.\\d{1,3}){3}(?::\\d{1,5})?"
the problem is if the port is missing this regex still finds just the ip which i dont want i want it to be all or nothing ip:port i tought removing the ? at the very end should achieve this but i still have the same problem.
does anyone know how or direct me to the information i need to chainge this to only identifing ip and port.
thanks.