I have this sample string in a source:
@include_plugin:PluginName param1=value1 param2=value2@
What I want is to find all occurances of @include_plugin:*@
from a source with a result of the PluginName
and each paramN=valueN
.
At this moment I'm fiddling with something like this (and have tried many variants): /@include_plugin:(.*\b){1}(.*\=.*){0,}@/
(using this resource). Unfortunately I can't seem to define a pattern which is giving me the result I want. Any suggestions?
Update with example:
Say I have this string in a .tpl-file. @include_plugin:BestSellers limit=5 fromCategory=123@
I want it to return an array with:
0 => BestSellers,
1 => limit=5 fromCategory=123
Or even better (if possible):
0 => BestSellers,
1 => limit=5,
2 => fromCategory=123