Also, since configuration shouldn't change between retrievals, cache the value of `$config[$key]`, and return early if we already have it cached. I'd implement that something like:

```php
if (isset($this->configs[$requestedName])) {
    return $this->configs[$requestedName];
}
$key = $this->match($requestedName);
if (isset($this->configs[$key])) {
    $this->configs[$requestedName] = $this->configs[$key];
    return $this->configs[$key];
}
$config = $serviceLocator->get('Config');
$config = $config[$key];
$this->configs[$requestedName] = $this->configs[$key] = $config;
return $config;
```

This will prevent the need to use PCRE on subsequent requests. I'd do similar logic for the `canCreateServiceWithName()` method as well, as a performance optimization.