# Extracting 2nd occurrence of a number in parenthesis

I have the following text string in Google Sheets, DV2:

Share Price vs. Fair ValueBelow Fair Value: AAPL ($126.85) is trading above our estimate of fairvalue ($118.02)Significantly Below Fair Value: AAPL is trading above ourestimate of fair value.


From this value, I want to extract the second number in parenthesis: 118.02

My formula:

=iferror(REGEXEXTRACT(DV2;"$$(.*)$$([A-Z,a-z,$])"))  The formula returns two columns:$118.02 S

I want to get rid of the column with the S and also the $ before the number. I tried using regex101.com/ to solve it but was unsuccessful. Is there a way to modify the REGEXEXTRACT formula so it returns a single value without the $?

Taken that the cell in question is DV2, you can use the following formula
=REGEXEXTRACT(DV2;".*\$(.+)\)")  If you want to turn the result to an actual number add ^1 at the end of the formula. =REGEXEXTRACT(DV2;".*\$(.+)\)")^1

If you need to, you can also add the IFERROR
=IFERROR(REGEXEXTRACT(DV2;".*\$(.+)\)")^1)  To extract the 2nd value In B1, enter the formula : =-LOOKUP(1,-RIGHT(LEFT(A1,MATCH(1,-INDEX(MID(A1,ROW($1:$250),1),0))),ROW($1:\$250)))