I am using php preg_match and I have the original expression as:
|(label\">Carried Price </span> £)((.)*?)( </div)|
But I want to be able to able to be able to use the same basic expression but be able to search for Carried Price or Web Exclusive. I tried something like:
|(label\">[Carried Price|Web Exclusive] </span> £)((.)*?)( </div)|
But no luck, any ideas? I also have to keep this structure of the regex as 3 groupings.
Additional the code I am using to test with example text
$page = ' <div class="web-exclusive-price"> <span class="label">Web Exclusive
</span> £399.00 </div>
<div class="web-only-label"> <span class="label">Offer not available in-store </span> </div>
<div class="deliveryShortcut"> <span class="label"><a href="#deliverySection" onclick="navigateOpenSection(\'delivery\');">Standard Delivery</a></span> Free </div>
';
$r = '|(label\">(?:Carried Price|Web Exclusive) </span> £)((.)*?)( </div)|';
preg_match($r, $page, $matches);