title: Google Sheets Extracting and Summing Numeric Data From String
body: <p>In a google spreadsheet, I have the following data stored in a single cell.  </p>
  
  <pre><code>a:2:{i:76;a:5:{i:0;a:11:{s:1:"g";s:0:"";s:1:"a";s:0:"";s:2:"st";s:0:"";s:4:"pass";s:0:"";s:2:"pr";s:0:"";s:2:"pu";s:0:"";s:2:"sv";s:0:"";s:2:"sa";s:0:"";s:2:"so";s:0:"";s:4:"poss";s:0:"";s:6:"tended";s:0:"";}i:218;a:14:{s:6:"number";s:0:"";s:1:"g";s:0:"";s:1:"a";s:0:"";s:2:"st";s:0:"";s:4:"pass";s:2:"12";s:2:"pr";s:1:"4";s:2:"pu";s:0:"";s:2:"sv";s:2:"23";s:2:"sa";s:2:"25";s:2:"so";s:0:"";s:4:"poss";s:3:".98";s:6:"tended";s:3:"720";s:6:"status";s:6:"lineup";s:3:"sub";s:1:"0";}i:222;a:14:{s:6:"number";s:0:"";s:1:"g";s:0:"";s:1:"a";s:1:"1";s:2:"st";s:0:"";s:4:"pass";s:2:"14";s:2:"pr";s:2:"17";s:2:"pu";s:2:"33";s:2:"sv";s:0:"";s:2:"sa";s:0:"";s:2:"so";s:0:"";s:4:"poss";s:4:"1.83";s:6:"tended";s:0:"";s:6:"status";s:6:"lineup";s:3:"sub";s:1:"0";}i:237;a:14:{s:6:"number";s:0:"";s:1:"g";s:0:"";s:1:"a";s:0:"";s:2:"st";s:1:"1";s:4:"pass";s:2:"12";s:2:"pr";s:2:"12";s:2:"pu";s:2:"26";s:2:"sv";s:0:"";s:2:"sa";s:0:"";s:2:"so";s:0:"";s:4:"poss";s:4:"1.68";s:6:"tended";s:0:"";s:6:"status";s:6:"lineup";s:3:"sub";s:1:"0";}i:253;a:14:{s:6:"number";s:0:"";s:1:"g";s:1:"1";s:1:"a";s:0:"";s:2:"st";s:1:"4";s:4:"pass";s:2:"12";s:2:"pr";s:2:"17";s:2:"pu";s:2:"29";s:2:"sv";s:0:"";s:2:"sa";s:0:"";s:2:"so";s:0:"";s:4:"poss";s:4:"1.37";s:6:"tended";s:0:"";s:6:"status";s:6:"lineup";s:3:"sub";s:1:"0";}}
  </code></pre>
  
  <p>I would like to sum all of the values assigned to each of the "pass" fields.</p>
  
  <pre><code>Snippet of Pass Fields     Extracted Data
  "pass";s:0:"";                  None
  "pass";s:2:"12"                 12
  "pass";s:2:"14"                 14
  "pass";s:2:"12"                 12
  "pass";s:2:"12"                 12
  Sum                             50
  </code></pre>
  
  <p>If possible, I would like to contain this calculation all within a single cell, without having to store temporary data in other parts of the spreadsheet.  The formula needs to be dynamic enough to support variable length input strings with different numbers of "pass" fields.  I've tried using a mix of <code>REGEXEXTRACT</code>/<code>FIND</code> along with a variety of google sheets substring functions to isolate these values but using these methods, I was only able to return the value assigned to the first occurrence of the "pass" field, not all of them.  Does anyone have an idea how I can accomplish this?</p>