<?php $str = '-Parameter1=1234 -Parameter2=38518 -param3 "Test \"escaped\"" -param4 10 -param5 0 -param6 "TT" -param7 "Seven" -param8 "secret" "-SuperParam9=4857?--SuperParam10=123"'; $pattern = '~--?(?<key>[^= ]+)[ =] (?| "(?<value> [^\\\\"]*+ (?s:\\\\.[^\\\\"]*)*+ )" | ([^ ?"]*) )~x'; preg_match_all ($pattern, $str, $matches); $result = array_combine($matches['key'], $matches['value']); print_r($result);
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`