in reply to Parse string and extract word after specific pattern
my $string = "stash_ST1.2.3.4_1.ROLLBACK.check.20170228-101051.435944. +txt"; # find one or more not "." between pair of "."s following word ROLLBAC +K my ($word) = $string =~ m/ROLLBACK\.([^\.]+)\./; print "$word\n"; # prints "check"
|
---|