1.验证整数或小数:^\d{0,}[.]?\d{1,}$ 2.验证IP:^((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)$