幫忙寫歌正則表達吧,弄了半天沒搞明白.
$content ='
- The North Face Size Chart
- Breathe deeply and slow your racing brain in the Be Calm Tank.
- VaporWick technology sweeps moisture away from your skin for quick evaporation to leave you feeling spectacular.
- Structured V-panel neckline.
- Racerback styling allows arms complete range of movement.
- Wide waistband with ruched side seams.
- Eye-catching burnout design.
- Logo at center back.
- Sports bra not included.
- 73% polyester, 27% cotton.
- Machine wash cold, tumble dry low.
- Imported.
- Measurements:
- Product measurements were taken using size XS. Please note that measurements may vary by size.
- View This Model Measurements
';
preg_match_all('/
(^/si',$content,$matches);
print_r($matches);
什麼Regex,可以把有
提取所有的li的內容.
寫得我混亂了. 最後那個數組[1]應該大約是這樣的.
matches[1][x]=Breathe deeply and slow your racing brain in the Be Calm Tank.
matches[1][x]=VaporWick technology sweeps moisture away from your skin for quick evaporation to leave you feeling spectacular.
matches[1][x]=Structured V-panel neckline.
.....
matches[1][x]=
Sports bra not included.
matches[1][x]=73% polyester, 27% cotton.
...
簡單說就是排除
裡面以
------解決方案--------------------
preg_match_all('/
(?!/siU',$content,$matches);