求正则表达式。
- PHP code
<!---ecms Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><span class='site-span'>拉手网
我想匹配
http://chongqing.lashou.com/
拉手网
这两个结果,我写的正则表达式为
- C# code
<!---ecms Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> $regular = '/]* href="([^"]*)"[^>]*>(.*)<\/a>/isU';
但是匹配出来的结果是错的误的。
——解决方案——————–
preg_match_all(‘#print_r($arr);
——解决方案——————–
preg_match_all(‘#print_r($arr);
——解决方案——————–
preg_match_all(‘#print_r($arr);/本2文来源[email protected]搞@^&代*@码2网搞gaodaima代码
——解决方案——————–
preg_match_all(‘#(.*)#’,$url,$arr);
print_r($arr);