幸虧提供了參考答案,不然很多正確的做法都通不過了。
<?php $str = "
- item 1
- item 2
"; //在這里補(bǔ)充代碼,實(shí)現(xiàn)正則匹配所有l(wèi)i中的數(shù)據(jù) $pattern = "#<[^>]+>(.*)
]+>#i"; preg_match_all($pattern,$str,$matches); print_r($matches[1]); ?--支持
<?php $str = "
"; //在這里補(bǔ)充代碼,實(shí)現(xiàn)正則匹配所有l(wèi)i中的數(shù)據(jù) $pattern = "#<[^>]+>(.*)
]+>#i"; preg_match_all($pattern,$str,$matches); print_r($matches[1]); ?--支持
2015-01-29
舉報