I have a list of product codes in a text file, on each like is the product code that looks like:
abcd2343 abw34324 abc3243-23A >
abcd2343 abw34324 abc3243-23A
def firstIntIndex(string): result = -1 for k in range(0, len(string)): if (bool(re.match('\d', string[k]))): result = k break return result