I can not understand where was wrong. Help me please. Here is the text that actually contains newline characters (I deleted them so as not to clutter the text of the question):
<div id="p0" class="productContainer" style="width: 195px; margin-left: 10px; margin-bottom: 35px"><div class="title" style="font-size: 14px">AmazonBasics HDMI Input to D?</div><a href="#!product/1-B014I8UQJY"><div class="productBox colorTipContainer whiteDeals" id="pB0"><div class="productImageDiv"><div class="productImage"><img class="active " src="https://images-na.ssl-images-amazon.com/images/I/41-O%2BZoRjZL._SS180_.jpg" width="180px" height="180px"></div></div><div class="productSmallDescription" style="margin-left: 6px;"><span class="searchPrices"><div class="priceLegend productPriceTableSmall">Amazon: <span class="priceAmazon productPriceTableSmall" style="line-height: 13px;">?$ 6.59</span></div><div class="priceLegend productPriceTableSmall"><span class="priceAmazon productPriceTableSmall" style="line-height: 13px;">?</span></div><div class="priceLegend productPriceTableSmall"><span class="priceAmazon productPriceTableSmall" style="line-height: 13px;">?</span></div></span></div><span class="colorTip" style="width: 250px; top: -18px;"><span class="colorTipContent">AmazonBasics HDMI Input to DVI Output Adapter Cable - 6 Feet (Latest Standard)</span><span class="pointyTipShadow"></span><span class="pointyTip"></span></span></div></a></div><br><div style="clear: both;margin: 60px;text-align: center;"><a href="https://www.amazon.com/gp/search?keywords=AmazonBasics%20HDMI%20Input%20to%20DVI%20Output%20Adapter%20Cable%20-%206%20Feet%20(Latest%20Standard)" class=".tabTrack">>?Continue your search on Amazon?<</a></div></div></div></div></div> I use QT code:
QString IS_TEST = "(?<=<div id=\"p0\" class=\"productContainer\").+(?=Continue your search on Amazon)"; QRegularExpression* re = new QRegularExpression(IS_TEST, QRegularExpression::MultilineOption); QRegularExpressionMatch match = re->match(site); if(match.hasMatch()) { qDebug() <<"НАШЛО"; }
R"(... любой текст ...)"- mymedia