Anyone can help me with this regular expression? I need to extract the price from a list of items.
<span class="woocommerce-Price-amount amount"><bdi>22,21<span class="woocommerce-Price-currencySymbol">€</span></bdi></span>.
I found this, but I am not extracting the ",".
=REGEXREPLACE(H8;"D+"; "")*1
2
Answers
You can use
See the regex demo.
Details
(d[d,]*)
– Capturing group 1 (the group value is the return value of theREGEXEXTRACT
function): a digit and then any zero or more digits or commas<spans+class="woocommerce-Price-currencySymbol">€
– a literal string with any one or more whitespaces between the tag name and the class attribute.try: