$str = '<A herf="http://www.sohu.com"> ee</A>';
preg_match("/\"(.+)\"/", $str, $matches);
print_r($matches);
preg_match("/\"(.+)\"/", $str, $matches);
print_r($matches);
解决方案 »
- 随机出现的编程怎么写?
- 求PHP设置网页过期的代码
- 我现在有一个230M左右的sql文件,用什么方法或软件能导入到本地?在线等,急急急。。。
- mysql安装问题
- 嘿,哥们来看看
- 想请教一个sql语句的问题 谢谢各位了
- 用phpMyAdmin远程连接,#1130 - Host '192.168.0.1' is not allowed to connect to this MySQL server
- session与数据库的问题
- 如何让一段数据转为hex形式
- thinkphp过滤表单表达式的函数
- 请教一个PHP程序从windows平台移植到linux平台下出现的问题
- dirname(__FILE__)."/../" 这个指的意思就是当前文件的上一级文件夹路径吧?
例如:<A herf="http://www.sohu.com"> ee</A>是在文件Y.TXT中的...而且该文件还有更多的链接.
怎样把它们全取出 来?
$str = preg_match_all("/href=[\"](.+)[\"]>/U",$str,$out);
print_r($out[1]);
href=(.+)>/U
得到链接,然后再去掉“或‘