i have looked at many regex charts and tutorials but i still cant get preg_match_all do what i need it to do.
i need to return this example:
param1,$config{}
from this string
$new_config{param1,$config{}}
note: none of the data in the string has anything to do with php
the hard part is that there can be many layers of ${}
this is what i came up with. i have very little regex knowledge so it is majorly messed up:
$regex = "@(^\$[a-zA-Z_]\{(.\s)*\}$)(?=(\$[a-zA-Z_]\{(.\s)*))@siu";