expectException(Regex\Exception\InvalidPatternException::class); $this->expectExceptionMessage("No ending delimiter '/' found"); Regex\replace('April 15, 2003', '/(\w+) (\d+), (\d+)', '${1}1,$3'); } }