title: KDB - Text parsing and cataloging text data
body: <p>I have data made of varying periodic strings that are effectively a time value list with a periodicity flag contained within. Unfortunately, each string length can have a different number of elements but no more than 7.</p>
  <p>Example below - (# and #/M at the end of each string means these are monthly values) starting at 8/2020 while #/Y are annual numbers so we divide by 12 for example to get to a monthly value. # at the beginning simple means continue from prior period.</p>
  <p>copied from CSV</p>
  <pre><code>ID,seg,strField
  AAA,1,8/2020 2333 2456 2544 2632 2678 #/M
  AAA,2,# 3333 3456 3544 3632 3678 #
  AAA,3,# 4333 4456 4544 4632 4678 #/M
  AAA,4,11/2021 5333 5456 #/M
  AAA,5,# 6333 6456 6544 6632 6678 #/Y
  </code></pre>
  <pre><code>t:(&quot;SSS&quot;;enlist&quot;,&quot;) 0:`:./Data/src/strField.csv; // read in csv data above
  t:update result:count[t]#enlist`float$() from t; // initiate empty result column
  </code></pre>
  <p>I would normally tokenize then pass each of the 7 columns to a function but the limit is 8 arguments and I would like to send other meta data in addition to these 7 arguments.</p>
  <pre><code>t:@[t;`tok1`tok2`tok3`tok4`tok5`tok6`tok7;:;flip .Q.fu[{&quot; &quot; vs'x}]t `strField];  
  
  </code></pre>
  <pre><code>t: ungroup t; 
  
  //Desired result
  ID   seg    iDate   result
  AAA  1  8/31/2020   2333    
  AAA  1  9/30/2020   2456    
  AAA  1  10/31/2020  2544    
  AAA  1  11/30/2020  2632    
  AAA  1  12/31/2020  2678    
  AAA  2  1/31/2021   3333    
  AAA  2  2/28/2021   3456    
  AAA  2  3/31/2021   3544    
  AAA  2  4/30/2021   3632    
  AAA  2  5/31/2021   3678    
  AAA  3  6/30/2021   4333    
  AAA  3  7/31/2021   4456    
  AAA  3  8/31/2021   4544    
  AAA  3  9/30/2021   4632    
  AAA  3  10/31/2021  4678    
  AAA  4  11/30/2021  5333    
  AAA  4  12/31/2021  5456    
  AAA  5  1/31/2022    527.75     &lt;-- 6333/12
  AAA  5  2/28/2022    527.75     
  AAA  5  3/31/2022    527.75     
  AAA  5  4/30/2022    527.75     
  AAA  5  5/31/2022    527.75     
  AAA  5  6/30/2022    527.75     
  AAA  5  7/31/2022    527.75     
  AAA  5  8/31/2022    527.75     
  AAA  5  9/30/2022    527.75     
  AAA  5  10/31/2022   527.75     
  AAA  5  11/30/2022   527.75     
  AAA  5  12/31/2022   527.75     
  AAA  5  1/31/2023    538.00     &lt;--6456/12
  AAA  5  2/28/2023    538.00     
  AAA  5  3/31/2023    538.00     
  AAA  5  4/30/2023    538.00     
  AAA  5  5/31/2023    538.00     
  AAA  5  6/30/2023    538.00     
  AAA  5  7/31/2023    538.00     
  AAA  5  8/31/2023    538.00     
  AAA  5  9/30/2023    538.00     
  AAA  5  10/31/2023   538.00     
  AAA  5  11/30/2023   538.00     
  AAA  5  12/31/2023   538.00     
  AAA  5  1/31/2024       etc..
  AAA  5  2/29/2024       
  AAA  5  3/31/2024       
  AAA  5  4/30/2024       
  AAA  5  5/31/2024       
  AAA  5  6/30/2024       
  AAA  5  7/31/2024       
          
  </code></pre>