diff --git a/Blueprints/src/BlueprintForm.php b/Blueprints/src/BlueprintForm.php index 832fdfc..ce68545 100644 --- a/Blueprints/src/BlueprintForm.php +++ b/Blueprints/src/BlueprintForm.php @@ -332,7 +332,7 @@ protected function deepMerge(array $a, array $b) foreach ($head as $key => $value) { if (strpos($key, '@') !== false) { // Remove @ from the start and the end. Key syntax `import@2` is supported to allow multiple operations of the same type. - $list = explode('-', preg_replace('/^(@*)?([^@]+)(@\d*)?$/', '\2', $key), 2); + $list = explode('-', preg_replace('/^(?:@*)?(.*?)(?:@\d*)?$/', '\1', $key), 2); $action = array_shift($list); $property = array_shift($list); @@ -380,7 +380,7 @@ protected function deepInit(array &$items, $path = []) // Handle special instructions in the form. if (strpos($key, '@') !== false) { // Remove @ from the start and the end. Key syntax `import@2` is supported to allow multiple operations of the same type. - $list = explode('-', preg_replace('/^(@*)?([^@]+)(@\d*)?$/', '\2', $key), 2); + $list = explode('-', preg_replace('/^(?:@*)?(.*?)(?:@\d*)?$/', '\1', $key), 2); $action = array_shift($list); $property = array_shift($list);