Ver Mensaje Individual
  #2 (permalink)  
Antiguo 13/09/2006, 12:00
Avatar de tunait
tunait
Moderadora
 
Fecha de Ingreso: agosto-2001
Ubicación: Terok Nor
Mensajes: 16.805
Antigüedad: 22 años, 9 meses
Puntos: 381
Buenas

¿y tiene que ser sí o sí con RegExp? yo haría algo tipo...

Código:
function ipe(valor){
	ip = valor.split('.');
	if(ip.length < 4){
		alert('No es una ip válida')
		return false;
	}
	for(m=0; m<ip.length; m++){
		num = parseInt(ip[m])
		if(isNaN(num) || num <0 || num >255){
			alert('No es una ip válida')
			return false;
			break;
		}
		
	}
}