php页面中,已知有很多url,把下面类型的url输出来
/default.aspx?tname=205\gc_text&hrefId=(*)
(*)代表数字,如 /default.aspx?tname=205\gc_text&hrefId=2579
这怎么实现呀,thanks
/default.aspx?tname=205\gc_text&hrefId=(*)
(*)代表数字,如 /default.aspx?tname=205\gc_text&hrefId=2579
这怎么实现呀,thanks
print_r($matches);
preg_match_all('/\/default.aspx\?tname=205\\gc_text&hrefId=\d+/is', $string, $matches);
print_r( $matches);
没有得到呀,
<?php
$string='/default.aspx?tname=205\gc_text&hrefId=2579,/default.aspx?tname=205\gc_text&hrefId=200';
preg_match_all('/\/default\.aspx\?tname=205\\\\gc_text&hrefId=\d+/is', $string, $matches);
print_r($matches);
?>