Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
<h1>(?'TITLE'.*)<\/h1>.*<div class="bx_slide">\s*<ul[^>]*>\s*(?:<li data-value="\d*" style="width: 20%; padding-top: 20%;"><span class="cnt"><span class="cnt_item" style="background-image:url\('(?'PHOTO1'[^']*)'\);"><\/span><\/span><\/li>\s*)?(?:<li data-value="\d*" style="width: 20%; padding-top: 20%;"><span class="cnt"><span class="cnt_item" style="background-image:url\('(?'PHOTO2'[^']*)'\);"><\/span><\/span><\/li>\s*)?(?:<li data-value="\d*" style="width: 20%; padding-top: 20%;"><span class="cnt"><span class="cnt_item" style="background-image:url\('(?'PHOTO3'[^']*)'\);"><\/span><\/span><\/li>\s*)?(?:<li data-value="\d*" style="width: 20%; padding-top: 20%;"><span class="cnt"><span class="cnt_item" style="background-image:url\('(?'PHOTO4'[^']*)'\);"><\/span><\/span><\/li>\s*)?(?:<li data-value="\d*" style="width: 20%; padding-top: 20%;"><span class="cnt"><span class="cnt_item" style="background-image:url\('(?'PHOTO5'[^']*)'\);"><\/span><\/span><\/li>\s*)?(?:<li data-value="\d*" style="width: 20%; padding-top: 20%;"><span class="cnt"><span class="cnt_item" style="background-image:url\('(?'PHOTO6'[^']*)'\);"><\/span><\/span><\/li>\s*)?(?:<li data-value="\d*" style="width: 20%; padding-top: 20%;"><span class="cnt"><span class="cnt_item" style="background-image:url\('(?'PHOTO7'[^']*)'\);"><\/span><\/span><\/li>\s*)?(?:<li data-value="\d*" style="width: 20%; padding-top: 20%;"><span class="cnt"><span class="cnt_item" style="background-image:url\('(?'PHOTO8'[^']*)'\);"><\/span><\/span><\/li>\s*)?(?:<li data-value="\d*" style="width: 20%; padding-top: 20%;"><span class="cnt"><span class="cnt_item" style="background-image:url\('(?'PHOTO9'[^']*)'\);"><\/span><\/span><\/li>\s*)?(?:<li data-value="\d*" style="width: 20%; padding-top: 20%;"><span class="cnt"><span class="cnt_item" style="background-image:url\('(?'PHOTO10'[^']*)'\);"><\/span><\/span><\/li>\s*)?(?:<li data-value="\d*" style="width: 20%; padding-top: 20%;"><span class="cnt"><span class="cnt_item" style="background-image:url\('(?'PHOTO11'[^']*)'\);"><\/span><\/span><\/li>\s*)?(?:<li data-value="\d*" style="width: 20%; padding-top: 20%;"><span class="cnt"><span class="cnt_item" style="background-image:url\('(?'PHOTO12'[^']*)'\);"><\/span><\/span><\/li>\s*)?(?:<li data-value="\d*" style="width: 20%; padding-top: 20%;"><span class="cnt"><span class="cnt_item" style="background-image:url\('(?'PHOTO13'[^']*)'\);"><\/span><\/span><\/li>\s*)?(?:<li data-value="\d*" style="width: 20%; padding-top: 20%;"><span class="cnt"><span class="cnt_item" style="background-image:url\('(?'PHOTO14'[^']*)'\);"><\/span><\/span><\/li>\s*)?(?:<li data-value="\d*" style="width: 20%; padding-top: 20%;"><span class="cnt"><span class="cnt_item" style="background-image:url\('(?'PHOTO15'[^']*)'\);"><\/span><\/span><\/li>\s*)?(?:<li data-value="\d*" style="width: 20%; padding-top: 20%;"><span class="cnt"><span class="cnt_item" style="background-image:url\('(?'PHOTO16'[^']*)'\);"><\/span><\/span><\/li>\s*)?(?:<li data-value="\d*" style="width: 20%; padding-top: 20%;"><span class="cnt"><span class="cnt_item" style="background-image:url\('(?'PHOTO17'[^']*)'\);"><\/span><\/span><\/li>\s*)?(?:<li data-value="\d*" style="width: 20%; padding-top: 20%;"><span class="cnt"><span class="cnt_item" style="background-image:url\('(?'PHOTO18'[^']*)'\);"><\/span><\/span><\/li>\s*)?(?:<li data-value="\d*" style="width: 20%; padding-top: 20%;"><span class="cnt"><span class="cnt_item" style="background-image:url\('(?'PHOTO19'[^']*)'\);"><\/span><\/span><\/li>\s*)?(?:<li data-value="\d*" style="width: 20%; padding-top: 20%;"><span class="cnt"><span class="cnt_item" style="background-image:url\('(?'PHOTO20'[^']*)'\);"><\/span><\/span><\/li>\s*)?<\/ul>\s*<\/div>.*<div class="item_price">\s*<span class="title">Цена:<\/span>.*<div class="item_current_price" id=".*">(?'PRICE'[\d ]*) руб\.<\/div>\s*<div class="item_economy_price" id=".*"(?: style="display: none")>(?:(?'DISCOUNT_PRICE'[\d ]*) руб\.)?<\/div>.*<\/div>.*<div class="item_info_section">.*<td class="prop-title">Бренд<\/td>\s*<td class="prop-value"><a href=".*">(?'MANUFACTURER'.*)<\/a><\/td>.*<td class="prop-title">Артикул<\/td>\s*<td class="prop-value">(?'VENDOR_CODE'.*)<\/td>.*<\/div>
/
gsuU

Description

no description available

Submitted by anonymous - 7 years ago