'${1}1,$3' ]]; yield ['The slow black bear jumps over the lazy dog.', 'The quick brown fox jumps over the lazy dog.', [ '/quick/' => 'slow', '/brown/' => 'black', '/fox/' => 'bear' ]]; yield ['Hello, World!', 'Hello, World!', [ '/foo/' => 'bar' ]]; } public function testReplaceEveryWithInvalidPattern(): void { $this->expectException(Regex\Exception\InvalidPatternException::class); $this->expectExceptionMessage("No ending delimiter '/' found"); Regex\replace_every('April 15, 2003', ['/(\w+) (\d+), (\d+)' => '${1}1,$3']); } }