diff --git a/src/Str.php b/src/Str.php index d1f91ac..60fa6b5 100644 --- a/src/Str.php +++ b/src/Str.php @@ -428,7 +428,7 @@ public static function mb_substr_replace($string, $replacement, $start, $length public static function placeholders(string $string, array $replacements, bool $caseInsensitive = false): string { - $regex = '/{([A-Z0-9_]+)}/' . ($caseInsensitive ? 'i' : ''); + $regex = '/{?([a-z0-9_]+)}?/' . ($caseInsensitive ? 'i' : ''); return preg_replace_callback( $regex,