Let say I have a variable in this format:
my $time1 = "2021-01-02T11:12:00+01:00";
I would like to get the part of the string from + or the last - to the last : and also the first delimiter which should be a + or -
What I tried so far:
print (split(/\+/, $time))[0];
but it will then print:
01:00
instead of:
01
and also doesn't store the first delimiter.