只要quote中间部分的话 $matches = []; $re = "/\\[quote\\](\\S*?)\\[\\/quote\\]/"; $str = "[quote]3333[/quote]\n"; preg_match($re, $str, $matches); print_r($matches);
只要quote中间部分的话