diff --git a/src/Changelog/Formatter/AddTopFormatter.php b/src/Changelog/Formatter/AddTopFormatter.php index 7aab5cc..c74114e 100644 --- a/src/Changelog/Formatter/AddTopFormatter.php +++ b/src/Changelog/Formatter/AddTopFormatter.php @@ -69,6 +69,6 @@ public function updateExistingLines( public function getLastVersionRegex(): string { - return '#.*#'; + return '#(\d+\.\d+\.\d+.*)#'; } } diff --git a/src/Changelog/Formatter/PrefixGroupFormatter.php b/src/Changelog/Formatter/PrefixGroupFormatter.php index 3af142b..f458c44 100644 --- a/src/Changelog/Formatter/PrefixGroupFormatter.php +++ b/src/Changelog/Formatter/PrefixGroupFormatter.php @@ -102,7 +102,7 @@ public function updateExistingLines( public function getLastVersionRegex(): string { - return '#.*#'; + return '/\[(\d+\.\d+\.\d+.*)\]/'; } private function getFormattedDate(): string