金光 发表于 2005 年 10 月 8 日 15:45:46

正则表达式例子:获得某个网页上的所有超裢接

正则表达式返回列表 method=post>URL:>;$fcontents = file($url);while(list(,$line)=each($fcontents)){while(eregi
('(href[[:space:]]*=[[:space:]]*?[[:alnum:]:@/._-]+?)(.*)',$line,$regs)){$regs = eregi_replace('(href
[[:space:]]*=[[:space:]]*?)([[:alnum:]:@/._-]+)(?)',\\2,$regs);echo     $regs;$line = $regs;}}}?>


转自:http://edu.chinaz.com

oghuz 发表于 2005 年 10 月 8 日 19:41:09

不懂但支持

金光 发表于 2005 年 10 月 8 日 15:45:46

正则表达式例子:获得某个网页上的所有超裢接

正则表达式返回列表 method=post>URL:>;$fcontents = file($url);while(list(,$line)=each($fcontents)){while(eregi
('(href[[:space:]]*=[[:space:]]*?[[:alnum:]:@/._-]+?)(.*)',$line,$regs)){$regs = eregi_replace('(href
[[:space:]]*=[[:space:]]*?)([[:alnum:]:@/._-]+)(?)',\\2,$regs);echo     $regs;$line = $regs;}}}?>


转自:http://edu.chinaz.com
页: [1]
查看完整版本: 正则表达式例子:获得某个网页上的所有超裢接