I need to pick up all '{$varname}' in a piece of text where var name can also be arrays.
I have tried multiple patterns with the first being
Code: Select all
preg_match_all('/(\$\{.+\})/simu',$text,$matches);Moderator: General Moderators
Code: Select all
preg_match_all('/(\$\{.+\})/simu',$text,$matches);Code: Select all
preg_match_all('((?!{)\$[^}]+)',$text,$matches);