欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

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

程序员文章站 2022-05-16 15:11:09
...
帮忙写歌正则表达吧,弄了半天没搞明白.

$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);
    帮忙写歌正则表述吧,弄了半天没搞明白

    声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。

    相关文章

    相关视频