Importregex Cryptotracker formula used to work, what happened?

Viewed 283

I've been using this formula to track the prices of cryptocurrencies...

=IMPORTREGEX(F13,"<div(?=[^>]class=””priceValue___11gHJ .””)[^>]*>$(.+?)</div>”)")

The cell referenced here is for this site: https://coinmarketcap.com/currencies/pax-gold/?update=1626649033501

it had been working, but now it shows an error: SyntaxError: Invalid regular expression: /<div(?=[^>]class=””priceValue___11gHJ .””)[^>]*>$(.+?)</div>”)/: Unmatched ')' (line 109).

I don't know how to read this error, so I'm not sure how to fix it. Can you help?

1 Answers

try:

=REGEXEXTRACT(QUERY(IMPORTXML(
 "https://coinmarketcap.com/currencies/pax-gold/?update=1626649033501",
 "//*"), "select Col1 where Col1 contains '@context'", 0), "price..(\d+.\d+|\d+)")*1

enter image description here


update:

=IFERROR(IFERROR(REGEXEXTRACT(QUERY(IMPORTXML(F12,
 "//*"), "select Col1 where Col1 contains '@context'", 0), 
 "price..(\d+.\d+.\d+|\d+.\d+|.\d+)")*1, 
 REGEXEXTRACT(QUERY(IMPORTXML(F12,
 "//*"), 
 "select Col1 where Col1 contains 'relatedExchangePairsList' and Col1 starts with ' 1'"),
 "\$ (\d+.\d+.\d+|\d+.\d+|.\d+) ")*1))

enter image description here

Related