I want to take a multiline string such as
(DateofAdmission04 DateofDischarge04 PatDateOfBirthC
= record_keydate1 record_keydate2 dob).
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)
(DateofAdmission04 = record_keydate1
DateofDischarge04 = record_keydate2
PatDateOfBirthC = dob).
(or similar). Is this possible using regex? Ideally as a general solution that would work on lists of any length.