Help with Regex

Hello,

I need help finding the correct regex string to parse a text result. This is what I am getting:

Best Sellers Rank: #37,975 in Store (See Top 100 in Store) #89 in Goods #249 in Items #255 in Products

And I would love to be able to just get the 37,975 value out of the above text. I found a way to do so with the regex positive lookbehind but only to find out this is not supported in Chrome :frowning:

Thanks!

Did you try this (\d*,*\d*) already? And keep only the first match?

This one with a lookbehind should work:

(?<=Rank: #)[\d\,]+

tested at https://regex101.com/

I tried this, but I get a "null" return.

With this one I get the following error:

JavaScript does not support regular expressions that can match 0 characters.

You seem to have left out one character; with regex every character is important, even space and backslash. It needs to look like this:

2021-01-03_070817

Unfortunately this does not work. I get a "null" result :frowning:

(?<=Rank: #)[\d\,]+ must works. If you get null maybe the problem is you dont getting the correct element from HTML DOM