正则表达式例子:获得某个网页上的所有超裢接
正则表达式返回列表 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 不懂但支持
正则表达式例子:获得某个网页上的所有超裢接
正则表达式返回列表 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]