<?php $s = 'thearea:北京/北京市/石景山区:9'; $s = preg_replace_callback("/^(.+?):(.+?)\/(.+?)\/(.+?):(.+?)$/", function($match) { return $match[5]; }, $s); echo $s;
You have javascript disabled. You will not be able to edit any code.