#!/usr/bin/perl use strict; use warnings; my $path = '/.snapshots123/yabsm/root/hourly/day=2021_03_04,time=21:20 +'; my @nums = $path =~ m/([0-9]{2,4})(?!.*\/)/g; print "@nums\n";
Outputs:
2021 03 04 21 20
In reply to Re: How can I combine these two regular expressions?
by tybalt89
in thread How can I combine these two regular expressions?
by thirtySeven
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |