How to parse a string into components?

Hello!

Need to disassemble the drain of the view
[[%mt4se-amuk-tradeterminal-4-p-59? &namespace=`main_uk` &topic=`TradeTerminal`]]

and the result is something like array or JSON object.
In addition to parsing regular expressions is there any library (php, nodejs) , someone in the topic?

Many thanks!

PS
Sample output:
//[[%mt4se-amuk-tradeterminal-4-p-59? &namespace=`main_uk` &topic=`TradeTerminal`]]

Array (
 [mt4se-amuk-tradeterminal-4-p-59] => Array
(
 ['namespace'] => 'main_uk',
 ['topic'] => 'TradeTerminal'
)
)
July 2nd 19 at 13:23
3 answers
July 2nd 19 at 13:25
Solution
And what of the regular season are not satisfied?
https://regex101.com/r/RqnaRE/1
July 2nd 19 at 13:27
July 2nd 19 at 13:29

Find more questions by tags PHPNode.jsParsing