我在php中运行如下程序
<?php
$str = '<img src=\'http://xxx/xxx.jpg\' alt=\'\' />';
$soImages = '/\'(.*?)\'/';
preg_match_all( $soImages, $str, $thePics );
$allPics = count($thePics[0]);
if( $allPics > 0 ){
echo $thePics[0][0];
}
?>返回的结果为'http://xxx/xxx.jpg'
我希望返回结果直接是http://xxx/xxx.jpg
请问如何让正则匹配返回不带单引号的结果?