Using Regex to find first instance of record IDs in array Lookup

I am using a software to autofill information in via a form where uses copy data from an existing tabl. There are linked record fields I want to pass into the appropriate fields onto the other table. However, I can only pass in one unique ID and not an array of multiple records.

For instance, I have a record with this value of a lookup field with record IDs: rec7Nk1lhJ0VJ0PNa, recbWvD9TI1PkMpdM

I need to have this in a formula where the output is: rec7Nk1lhJ0VJ0PNa

This should also work for where there isn’t a comma-separated string, as if one record is already it should just pass the same value

Frankly, it doesn’t matter if it’s the first, 2nd, 3rd, etc record, what matters most is I need to pass only one record ID into the URL of the form

Is there a way to use Regex_Extract() to obtain just one instance?

edit: I learned that regex doesn’t work on an array in airtable and you have to turn it into a string, but the formula doesn’t work that I’ve arrived at so far: REGEX_EXTRACT({ACompanies Record ID}&" “,”^(.+?),")

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.