0

Any expert on Google Sheets Regular expressions? I am trying to extract the numbers that exist in the second occurrence of this pattern value="400" from the HTML text that I am sharing in the link below. The number inside could have more digits. so I am trying to build a regex formula that first finds the second occurrence of the pattern and then extracts any numbers that are in between. Example value="any digits in here"

This is what I tried but it still brings everything =REGEXEXTRACT(A2,"(?i)(?:.*?value){2}")

Any help would be appreciated!

Feel free to make a copy out of the template below.

enter link description here

1 Answer 1

1

Possibly not the most elegant way, but try with:

=REGEXEXTRACT(A2,".+value.+(value=\""\d+\"")")
1
  • Thank you so much! It works perfectly!
    – Gilbert
    Jan 19, 2023 at 3:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.