title: Regex - Extract number (with 2 decimals) from string
body: <p>I am using RegexExtract to extract a numberic value from text. I used the following regex <code>[0-9]+(\.[0-9][0-9]?)?</code> from the below link but I found it is only extracting two values after the decimal place. I need also the number in front of it. Not sure why it isn't working. I've tried different variations of it as well.</p>
  
  <p><a href="https://stackoverflow.com/questions/308122/simple-regular-expression-for-a-decimal-with-a-precision-of-2">Simple regular expression for a decimal with a precision of 2</a></p>
  
  <p>The text I am pulling from isn't always the same length and is about 100 characters along. In the text is the following in which I need to pull the numerical value only (x.xx): <strong>Gmax = 2.3428</strong></p>
  
  <p><code>ThisWorkbook.Worksheets(Warn.MachBox.Value &amp; "_C1").Range("B" &amp; Duncan2 + 1).Value = RegexExtract(ThisWorkbook.Worksheets(Warn.MachBox.Value &amp; "_C1").Range("C" &amp; Duncan2 + 1).Value, "Gmax = [0-9]+(\.[0-9][0-9]?)?")</code></p>
  
  <p>The current way I have it and the different variations I've tried are only returning 0.34 and excluding the value before the decimal, if there is one. I need 2.34.</p>
  
  <p>Any suggestions are greatly appreciated. Thanks!</p>
  
  <p>Edit: Forgot to add the RegexExtract function info. This was found at the below link:
  <a href="https://stackoverflow.com/questions/7086270/how-to-extract-text-within-a-string-of-text">How to extract text within a string of text</a></p>