'REGEXEXTRACT between strings but only display numbers in Google Sheets [closed]

I have a Google Sheets formula below, which extracts the contents between a multi line string:

=REGEXEXTRACT(A2, "(?ms)mystring1(.*)mystring2")

It works as expected, and displays all the content between the 2 strings. The problem, however, is that I only need to display the numbers (with decimals), and not the full content.

Can anybody point me in the right direction? I have an example of the formula in a demo sheet here.



Solution 1:[1]

use:

=REGEXEXTRACT(SUBSTITUTE(A1, CHAR(10), " "), "string1.+ (\d+).+string2")

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1