I have a list like the example data below. Every entry in the list follows the pattern 'source/number_something/'. I would like to create a new list like the output below, where the entries are just the "something". I was thinking I could use a for loop and string split on _ but some of the texts that follow also include _. This seems like something that could be done with regex, but I'm not that good at regex. Any tips are greatly appreciated.
example data:
['source/108_cash_total/',
'source/108_customer/',
'source/108_daily_units_total/',
'source/108_discounts/',
'source/108_employee/',
'source/56_cash_total/',
'source/56_customer/',
'source/56_daily_units_total/',
'source/56_discounts/',
'source/56_employee/']
output:
['cash_total',
'customer',
'daily_units_total',
'discounts',
'employee',
'cash_total',
'customer/',
'daily_units_total',
'discounts',
'employee']