fork download
  1. #!/usr/bin/perl
  2. use feature 'say';
  3. use strict;
  4. use warnings;
  5.  
  6. my $str = "name_of_file0000000546210618.A001.6476871457";
  7. say $str =~ s/name_of_file\K\d*(?=\d{6}\.A\d{3})//r;
Success #stdin #stdout 0.01s 5512KB
stdin
Standard input is empty
stdout
name_of_file210618.A001.6476871457