<?php
$str = '<a href="http://www.xii.com" target="_blank">开始啦······还在等什么?准备开始!</a>';$str = preg_replace('/\[img\](.+?)\[\/img\](.*)/', '<img src=\\1></img>\\2', $str);
$str = preg_replace('/(<img.+?img>).+?(http.+?)".+?>(.*)<\/a>/', '\\1, \\2, \\3', $str);
$a = explode(',',$str);echo $a[0];
echo $a[2];
echo $a[1];
?>
$str = '<a href="http://www.xii.com" target="_blank">开始啦······还在等什么?准备开始!</a>';$str = preg_replace('/\[img\](.+?)\[\/img\](.*)/', '<img src=\\1></img>\\2', $str);
$str = preg_replace('/(<img.+?img>).+?(http.+?)".+?>(.*)<\/a>/', '\\1, \\2, \\3', $str);
$a = explode(',',$str);echo $a[0];
echo $a[2];
echo $a[1];
?>
$str = preg_match('/(<img.+>).+(http.+)".+>(.*)<\/a>/U', $str, $a);
print_r( $a );