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