diff options
author | Florian Pritz <bluewind@xinu.at> | 2017-03-13 10:47:04 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2017-03-13 10:47:04 +0100 |
commit | c7d5a7e840bf0fe5e3bb126247d5e3e1dcb982bc (patch) | |
tree | e82a313562a1cf4e40d55084fcd866c6d487de74 /lib | |
parent | 18f143459991e44e10137fed501d162ae54274f8 (diff) | |
download | App-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>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/App/BorgRestore.pm | 2 |
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}; |