這個正則表達式有什麼問題?儘管通過/i
轉義,但我仍然收到錯誤「分隔符不能是字母數字或反斜槓」。分隔符不能是字母數字或反斜槓
$tokenregex = '/sid(.*)/i';
$bizresponse=curl_getinfo ($curlop1);
$bizresponse = print_r($bizch);
if (preg_match($tokenregex[1], $bizresponse))
{
do things
}
bizresponse是這個
TTP://anonymouse.org/cgi-bin/anon-www.cgi/http://ca.isohunt.com/member.php產地= /論壇的index.php & SSL =沒有& SID = 915625588370db24a51d713871a3ec1a [內容] => text/html的;字符集= UTF-8 [HTTP_CODE] => 200 header_size] => 1417 [request_size] => 627 [FILETIME] => -1 [ssl_verify_result] => 0 [redirect_count] => 1 [TOTAL_TIME] => 2.666479 [namelookup_time ] => 3.8E-5 [CONNECT_TIME] => 0.168507 [pretransfer_time] => 0.168547 [size_upload] => 0 [size_download] => 39526 [speed_download] => 14823 [speed_upload] => 0 [download_content_length] => 415 [ upload_content_length] => 0 [starttransfer_time] => 0.778169 [redirect_time] => 1.383665 [certinfo] =>數組()[REDIRECT_URL] =>)
更換
$tokenregex[1]
顯示我們所有的代碼,包括使用的代碼。 –顯示的表達式看起來很好,但似乎你正試圖用preg來使用舊的ereg模式。 –