Good day.
Help to deal with regular. Through curl got the page into the $ page variable. The variable contains approximately the following
<div id="middleContent"> <div class="right-content"> <div> <div id="labelRussianUL"> <h3 style="cursor: pointer; text-decoration: underline;">...</h3> </div> <div id="textRussianUL" style="display: none;"> <p>1. Запись 1</p> <p>2. Запись 2</p> <p>3. Запись 3</p> ... где то 100 ... <p>...</p> </div> <div id="labelRussianFL"> <h3 style="cursor: pointer; text-decoration: underline;">...</h3> </div> <div id="textRussianFL" style="display: none;"> <p>1. Запись 1</p> <p>2. Запись 2</p> <p>3. Запись 3</p> ... очень много записей более 5000 ... <p>...</p> </div> </div> </div> </div> I can not understand why
preg_match('/<div[^>]*id="textRussianFL"[^>]*>(.*?)<\/div>/', $page, $match); preg_match('/<div[^>]*id="textRussianUL"[^>]*>(.*?)<\/div>/', $page, $match); does not work preg_match('/<div[^>]*id="textRussianUL"[^>]*>(.*?)<\/div>/', $page, $match); is working .
Regular checked on the site regex101.com . With a small number of records works. Thank you in advance for your help.