当前位置:Gxlcms > PHP教程 > 帮忙写歌正则表述吧,弄了半天没搞明白

帮忙写歌正则表述吧,弄了半天没搞明白

时间:2021-07-01 10:21:17 帮助过:10人阅读

帮忙写歌正则表达吧,弄了半天没搞明白.

$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:

    • Length: 25 in



  • 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);

  • 什么正则表达式,可以把有
    提取所有的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);
  • 人气教程排行