Re: [請益] 關於regular expression
我想請問一下
http://tw2.php.net/manual/en/function.preg-match-all.php
裡面的範例
<?php
preg_match_all("|<[^>]+>(.*)</[^>]+>|U",
"<b>example: </b><div align=left>this is a test</div>",
$out, PREG_PATTERN_ORDER);
echo $out[0][0] . ", " . $out[0][1] . "\n";
echo $out[1][0] . ", " . $out[1][1] . "\n";
?>
中間的 pattern 有點看不太懂
能否幫我解釋一下
另外想請問有沒有推薦的regular expression教學網站
國外的也沒關係
最好是有多點範例能夠比較的 謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 124.12.5.191
推
04/10 13:40, , 1F
04/10 13:40, 1F
推
04/11 00:49, , 2F
04/11 00:49, 2F
→
04/11 01:15, , 3F
04/11 01:15, 3F
討論串 (同標題文章)
完整討論串 (本文為第 2 之 2 篇):
PHP 近期熱門文章
PTT數位生活區 即時熱門文章