fork(5) download
  1. <?php
  2. $string = '192.168.0.23, 192.168.2.33, 124.125.126.127';
  3. $pattern = '/[\w.]{15}/';
  4. $replacement = '';
  5. $string = preg_replace($pattern, $replacement, $string);
  6. echo rtrim($string, ",")
  7. ?>
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
192.168.0.23, 192.168.2.33,