Let's say, I have this script below in mikrotik router, I want to extract an array with key and value, how to do that if there is another value contains a = character,
add name=100YER on-login=":do {:put \"a\";} on-error={};" rate-limit=256k/512k
The result should be like this:
$result=array ('name'=>'100YER', on-login=>':do {:put \"a\";} on-error={};', 'rate-limit'=>'256k/512k');
I used this regex to split it by =, but the problem is in on-login value.
if (preg_match_all('/[^=]+/i', $response, $MATCHES) ){
//
}