|
@@ -326,9 +326,10 @@ class JsonManipulator
|
|
|
}
|
|
|
|
|
|
// try and find a match for the subkey
|
|
|
- if ($this->pregMatch('{"'.preg_quote($name).'"\s*:}i', $children)) {
|
|
|
+ $keyRegex = str_replace('/', '\\\\?/', preg_quote($name));
|
|
|
+ if ($this->pregMatch('{"'.$keyRegex.'"\s*:}i', $children)) {
|
|
|
// find best match for the value of "name"
|
|
|
- if (preg_match_all('{'.self::$DEFINES.'"'.preg_quote($name).'"\s*:\s*(?:(?&json))}x', $children, $matches)) {
|
|
|
+ if (preg_match_all('{'.self::$DEFINES.'"'.$keyRegex.'"\s*:\s*(?:(?&json))}x', $children, $matches)) {
|
|
|
$bestMatch = '';
|
|
|
foreach ($matches[0] as $match) {
|
|
|
if (strlen($bestMatch) < strlen($match)) {
|