fork download
  1. #!/usr/bin/perl
  2. use Data::Dumper;
  3. $str = '
  4. SOUND HOLIC - 博麗 -HAKUREI-
  5. asdSOUND HOLIC - 博麗 -HAKUREI- Part 1
  6. ';
  7.  
  8. print Dumper $str =~ /^(.+?)(?:\s*Part \d+?\s*)?$/mg;
Success #stdin #stdout 0.02s 7372KB
stdin
Standard input is empty
stdout
$VAR1 = 'SOUND HOLIC - 博麗 -HAKUREI-';
$VAR2 = 'asdSOUND HOLIC - 博麗 -HAKUREI-';