Subject: | $RE{time}{iso} does not work if preceding text contains digits |
Here's example output of gnu ls with times expressed as iso dates:
$ ls -al --time-style=full-iso /etc/bash.bashrc
-rw-r--r-- 1 root root 1864 2016-05-17 12:45:29.000000000 +0200 /etc/bash.bashrc
Feeding this line to the $RE{time}{iso} regexp does not seem to detect the date:
$ perl -MRegexp::Common=time -e '"-rw-r--r-- 1 root root 1864 2016-05-17 12:45:29.000000000 +0200 /etc/bash.bashrc" =~ /$RE{time}{iso}/; warn $&'
Warning: something's wrong at -e line 1.
However, if the two numbers (link count & file size) before the date are stripped, then it works:
$ perl -MRegexp::Common=time -e '"-rw-r--r-- root root 2016-05-17 12:45:29.000000000 +0200 /etc/bash.bashrc" =~ /$RE{time}{iso}/; warn $&'
2016-05-17 12:45:29.000000000 at -e line 1.
(Another smaller issue (for me) is that the timezone is not detected here)