in reply to Regex Matching Query
Your snippet won't compile :)
Anyway, $' will give you the rest of the string after the match. Is this what you're looking for?
my $file = "TEST SHOW S01E01"; while($file =~ m/(.*?)(\d+)/i) { my $show = $1; print "Show name: $show\n"; $file = $'; }
Output:
Show name: TEST SHOW S Show name: E
|
|---|