Добрый день.
Возникла проблема, нужно с помощью регулярного выражения извлечь текст заключенный между блоками.
Сейчас делаю так:
/(?<=<div id=\"summary\" class=\"\">\n)(.+)(?=\n<\/div>)/ui
Но ничего не получается, если добавить модификатор \s
то извлекается текст от начала нужного блока, но до конца текста:
/(?<=<div id=\"summary\" class=\"\">\n)(.+)(?=\n<\/div>)/uis
Текст поиска:
<div class="hp_hotel_description_hightlights_wrapper">
<div class="hotel_description_wrapper_exp">
<div id="summary" class=""> <!--Начать тут -->
<p>Offering a terrace and a lounge area, Abkhazskaya Usadba is located in Gagra, 500 metres from the Black Sea coast. Free WiFi and free private parking are available on site.</p>
<p>The rooms feature a balcony, private entrance, air conditioning, a fridge, hairdryer and flat-screen TV.</p>
<p>Guests can dine in the guest house’s canteen serving home made food.</p>
<p>Gagra Train Station is 2 km away, and Sochi International Airport is 40 km from Abkhazskaya Usadba.</p>
</div> <!-- Закончить тут -->
<p class="summary " style="color: #555; font-size: 95%; font-style: italic; ">
Hotel Rooms: 24
</p>
</div>
<div class="property_hightlights_wrapper">
<div class="property_highlights_left">
<div class="photo_overlay filter_api_vers_left filter_api_width">
<span class="inner_content_filter_api">
<p class="filter_highlights_title ">
Property Highlights
</p>
<span rel="300" class="lastbooking jq_tooltip" title="<strong>Double or Twin Room with Shower</strong> booked 1 day, 15 hours, 41 minutes ago">
Latest Booking: May 4
</span>
<span class="highlighted_facilities_reinforcement highlighted_facilities_property_reinforcement">
<p class="filter_api_subtitle">
</p>
</span>
<span class="hp_usp_filter_api_el">
<i class="b-sprite hotelfacility_id_96"></i>
<span class="hp_usp_filter_api_text">
Free WiFi
</span>
</span>
<span class="hp_usp_filter_api_el">
<i class="b-sprite hotelfacility_id_2"></i>
<span class="hp_usp_filter_api_text">
Free parking
Помогите пожалуйста.