IP地址部分替换
# PHP
$ip_addr = '192.168.0.1';
$ip_addr = preg_replace('/(\d+)\.(\d+)\.(\d+)\.(\d+)/', '$1.$2.*.$4', $ip_addr);
IP地址部分替换
# PHP
$ip_addr = '192.168.0.1';
$ip_addr = preg_replace('/(\d+)\.(\d+)\.(\d+)\.(\d+)/', '$1.$2.*.$4', $ip_addr);