함수 match ips

함수 match_ips
match ip addresses
regex to return ip addresses from lines of text

1 PHP[ | ]

preg_match_all('/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/', $str, $ip_matches);
print_r($ip_matches[0]);
function match_ips($str) {
  preg_match_all('/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/', $str, $ip_matches);
  return $ip_matches[0];
}

2 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}