<?php $str = '123.23.23.4/17,'; $str .= '123.23.23.4/23,'; $str .= '123.23.23.4/8,'; $str .= '123.23.23.4/18'; preg_match_all("~/\K(?:[1-9]|[12][0-9]|3[01])\b~", $str, $matches); print_r($matches[0]);
You have javascript disabled. You will not be able to edit any code.