summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2017-03-13 10:47:04 +0100
committerFlorian Pritz <bluewind@xinu.at>2017-03-13 10:47:04 +0100
commitc7d5a7e840bf0fe5e3bb126247d5e3e1dcb982bc (patch)
treee82a313562a1cf4e40d55084fcd866c6d487de74
parent18f143459991e44e10137fed501d162ae54274f8 (diff)
downloadApp-BorgRestore-c7d5a7e840bf0fe5e3bb126247d5e3e1dcb982bc.tar.gz
App-BorgRestore-c7d5a7e840bf0fe5e3bb126247d5e3e1dcb982bc.tar.xz
timespec_to_seconds: Use atomic groups in regex
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--lib/App/BorgRestore.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/App/BorgRestore.pm b/lib/App/BorgRestore.pm
index cf64859..8599f6b 100644
--- a/lib/App/BorgRestore.pm
+++ b/lib/App/BorgRestore.pm
@@ -155,7 +155,7 @@ sub timespec_to_seconds {
my $self = shift;
my $timespec = shift;
- if ($timespec =~ m/^(?<value>[0-9.]+)(?<unit>.+)$/) {
+ if ($timespec =~ m/^(?>(?<value>[0-9.]+))(?>(?<unit>[a-z]+))$/) {
my $value = $+{value};
my $unit = $+{unit};