title: How can I split string using regular expression in bigquery
body: <p>I want to split the field in big query data table. </p>
  
  <p>I give you sample case..</p>
  
  <p>==case 1==
  Source Filed= "idx1-cnt1-name1,idx2-cnt2-name2... same pattern"</p>
  
  <pre><code>Result table
  idx | cnt | name |
  idx1,cnt1,name1
  idx2,cnt2,name2,....
  </code></pre>
  
  <p>in query:</p>
  
  <pre><code>select                      
      regexp_extract(split_col, r'([\d]*)-') as ItemIdx,  
      regexp_extract(split_col, r'-([\d]*)-') as Cnt,
      regexp_extract(split_col, r'-([\d]*)$') as TitleIdx
  From (
  Select pid,now, split(source field, ',') split_col from (       
  SELECT * FROM table ))
  </code></pre>
  
  <p>but I can't make a code this case </p>
  
  <p>this case string has multiple saparator.</p>
  
  <p>==case 2==</p>
  
  <p>Source String = "item1-name1-type1-value1,.... same pattern"</p>
  
  <pre><code>Result Table
  name | type
  name1, type1
  name2,type2
  </code></pre>
  
  <p>field count is different.</p>
  
  <p>but just I need second, third field value.</p>
  
  <p>how can I make a query..</p>