(Note: Not necessarily must use regex) For example my string is
my $str = "namefile.json.bz2"
I want the main file name only which is <