title: How to capture an indeterminate number of groups? Reg Ex
body: <p>I want to take a multiline string such as </p>
  
  <pre><code>(DateofAdmission04 DateofDischarge04 PatDateOfBirthC
  = record_keydate1 record_keydate2 dob).
  </code></pre>
  
  <p>And capture each of the words, to then be paired with it's associated word on the other side of the equals, ultimately to produce the result (in this example)</p>
  
  <pre><code>(DateofAdmission04 = record_keydate1 
  DateofDischarge04 = record_keydate2 
  PatDateOfBirthC = dob).
  </code></pre>
  
  <p>(or similar). Is this possible using regex? Ideally as a general solution that would work on lists of any length.</p>