Dhilip Venkatesh Uvarajan

Using regular expression extraction in Cloutest for correlation

Discussion created by Dhilip Venkatesh Uvarajan Champion on Sep 13, 2017
Latest reply on Oct 25, 2017 by Salvador Camacho Reyes

I have a html page like below where i am trying to extract product URL but see that there are many different patterns. I was intially using substring boundries <h6><a href=" and "> but realized that class="image-fade" data-value="4294722475 get appended to extracted URL and messes up the URI. I knew that I can use regex for extraction, so I used a simple regex for correlation like below. I tested the regex online and it extracts URL fine.

 

 

For whatever reason it does not work in SOASTA. Should I do anything additional for making regex extraction work ??

 

 

 

</div>
<div class="parsys iparsys par-area-e"><div class="section"><div class="new"></div>
</div><div class="iparys_inherited"><div class="parsys iparsys par-area-e"><div class="parbase section relatedcategories">
<div class="category-list related-categories v-spacing-large clearfix grid-align-center met-related-categories">
<h2 class="text-uppercase">Related Categories</h2>
<div class="grid-16 tablet-grid-16"><h6><a href="/c/Light-switches-dimmers-Electrical" class="image-fade" data-value="4294722447"><img class="img-fluid js-c-lazy-load-img" src="/etc/designs/default/0.gif" alt="" data-src="//www.lowes.com/mobile/app/content/category_images/LightSwitchesDimmerssm.png"></img><span class="ellipsis-two-line v-spacing-large">Light Switches &amp; Dimmers</span></a></h6></div>
<div class="grid-16 tablet-grid-16"><h6><a href="/pl/Electrical-outlets-Electrical-outlets-adapters-Electrical/4294722475" class="image-fade" data-value="4294722475"><img class="img-fluid js-c-lazy-load-img" src="/etc/designs/default/0.gif" alt="" data-src="//www.lowes.com/mobile/app/content/category_images/ElectricalOutletssm.png"></img><span class="ellipsis-two-line v-spacing-large">Electrical Outlets</span></a></h6></div>
<div class="grid-16 tablet-grid-16"><h6><a href="/pl/Electrical-boxes-covers-Electrical/4294653960" class="image-fade" data-value="4294653960"><img class="img-fluid js-c-lazy-load-img" src="/etc/designs/default/0.gif" alt="" data-src="//www.lowes.com/mobile/app/content/category_images/ElectricalBoxesCoverssm.png"></img><span class="ellipsis-two-line v-spacing-large">Electrical Boxes &amp; Covers</span></a></h6></div>
<div class="grid-16 tablet-grid-16"><h6><a href="/pl/Electrical-boxes-covers-Electrical/4294653960"><img class="img-fluid js-c-lazy-load-img" src="/etc/designs/default/0.gif" alt="" data-src="//www.lowes.com/mobile/app/content/category_images/ElectricalBoxesCoverssm.png"></img><span class="ellipsis-two-line v-spacing-large">Electrical Boxes &amp; Covers</span></a></h6></div>
</div>
</div>
</div>
</div>
</div>

Outcomes