Php regularly gets the contents of the div of the specified class

  <DIV class=xx_time>
            <LI>:2018-08-22 22:01:<script src="/plus/count.php?view=yes&aid=514&mid=2" type="text/javascript" language="javascript"></script> </LI>
   </DIV>
  <DIV class=xx_cont>
          <div>
    
</div>
    </DIV>

as shown in the figure above, notice that DIV is uppercase and class does not have double quotes
I don"t know how to write regular to get the contents of xx_cont

May.22,2021

/<DIV class=xx_cont>(.*)<\/DIV>/

<DIV class=xx_cont>([\S\s]+?)<\/DIV>

  • 1. Regular expressions can ignore case matching, and you can find the corresponding modifier
  • according to different programming languages.
  • 2. In addition to regular expressions, you can usually use xPath,CssSelector to select elements
Menu