Using regex to extract index of the element from the list and retrieve value

Solution 1:

You can use \d+\s?(ml|-pack|g|L)$ to check for a number with a unit after it.

import re

str_list = ['Navitas', 'Organic Cacao Powder', '227g', 'SALE $7.49 ea', 'Regular $9:99-ea', 'Valid 01/12 - 01/18']
r = r"\d+\s?(ml|-pack|g|L)$"
unit_index = [idx for idx, val in enumerate(str_list) if re.search(r, val)][0]