I have a string, such as
"<span class="m-product-data-3__price-value" itemprop="price" content="143.28">XYZZZ</span>"
or
"<span class="m-product-data-3__price-value" itemprop="price" content="198.22">XYZZZ</span>"
I want to extract XYZZZ value with preg_match($pattern, $string, $match)
.
But I want the value to be in $match(1)
How to do it ? What pattern to use?
'<span class=\"m-product-data-3__price-value\" itemprop=\"price\" cont ent=\"(.*)\">(.*?)<'si
- gives me the value in $match(2)