我使用它使用如何將eregi轉換爲preg_match?
eregi($match="^http/[0-9]+\\.[0-9]+[ \t]+([0-9]+)[ \t]*(.*)\$",$line,$matches)
一個lib但eregi現在已經過時了,我想上述轉換成的preg_match。我試了一下,如下
preg_match($match="/^http/[0-9]+\\.[0-9]+[ \t]+([0-9]+)[ \t]*(.*)\$/i",$line,$matches)
但它拋出一個錯誤說Unknown modifier '[' in
filename.php
任何想法如何解決這個問題?
感謝
良好的文檔,你可以離開了'$匹配='在這兩個代碼例子,這樣他們是完全不必要的 – lamas 2010-03-23 16:08:24
[「如何將PHP的eregi更改爲preg_match」](http://customphpfunctions.blogspot.com/2011/12/how-to-change-phps-eregi-to-pregmatch.html )解釋了eregi和preg_match,以及如何替換折舊函數。 – 2011-12-04 19:39:22