Help fix the regular to work on the PHP preg_match_all () The pattern is as follows:

Название:</span><div>(.+?)</div> 

Source text:

 <li class='catalog-list-linkedstyles'><span class='catalog-list-title'>Возможные модификации </span><ul><li class='catalog-list-item'><span>Название:</span><div>Wm's Trestles 30 Long</div></li> 

What should a regular expression look like for PHP?

    1 answer 1

    Something like this:

     $res = array(); preg_match_all('/Название:<\/span><div>([\n.]+?)<\/div>/m', $var, $res ); print_r( $res ); 
    • Thank! / m what does it mean? - Andrei Surzhikov
    • multiline search - timka_s