title: Regex find value between a space and period for Google Sheet
body: <p>I have the following cell values:</p>
  
  <pre><code>LOT: 4 SP: 144731
  LOT: 7 RP: 804923
  LOT: 6 RP: 804923
  </code></pre>
  
  <p>I want to obtain:</p>
  
  <pre><code>SP
  RP
  RP
  </code></pre>
  
  <p>I have been trying the following where the values are in column N:</p>
  
  <pre><code>=ARRAYFORMULA(IF(REGEXMATCH(N2,"LOT: [1-9]+? :"),TRIM(REGEXREPLACE(N2,".*?(?:LOT: ([1-9]+?) :|$)","$1 ")),))
  </code></pre>
  
  <p>Getting the lot value using the following worked but I need the SP/RP etc value</p>
  
  <pre><code>=ARRAYFORMULA(IF(REGEXMATCH(N2,"LOT: .+? RP:"),TRIM(REGEXREPLACE(N2,".*?(?:LOT: (.+?) RP:|$)","$1 ")),))
  </code></pre>