Regex is trimming off too many characters


I’m trying to create a form builder that my users can use with a homegrown markup inspired by BBCode converting their questions into actual HTML

I’ve got a regex “fiddle” up at https://regex101.com/r/5uf7fK/1
SEMrush

I have two examples

Name: (TEXT|enter your name here)
Type of tenancy: (RADIO|This is a periodic tenancy,This tenancy ends on (TEXT|enter date))

Code (markup):

and the regex I’m using is

preg_match_all("/(((^))*))/", $block, $matches);

PHP:

So here’s what I’m getting

upload_2020-9-3_15-57-41.png
Ideally, I’d like to work with the full match result and the first result is good.

In the second result, my expected output is:

(RADIO|This is a periodic tenancy,This tenancy ends on (TEXT|enter date))

Code (markup):

but the regular expression trims off the second )

Anyone know how I can edit that so that it returns both ) ?