In J6 in my calc workbook exists the text
Greg Zuerlein kicks off 65 yards returned by Jaydon Mickens for 20 yards (tackle by Jayron Kearse)
the formula below is in another cell:
=REGEX($J6,"^.+returned by.+ for ([0-9]+)|(no gain).*$","$1")
My goal is that the formula returns the text 20. None work, and I always end up with this output:
20 yards (tackle by Jayron Kearse)
Changing the regex pattern so that it doesn't have $ or ^ doesn't change the output. Changing the $ into {0,} also does not change the output. My thought process was that the regular expression was supposed to be greedy by nature, and collect all the chars it could before matching, but that doesn't seem to be happening here. Could there be an issue with capture groups using alternation?
I've done similar searches using other programs and I'm stumped as to why this doesn't work here. Any insight would be highly appreciated.