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
Try this code it will work fine
import re text = "MARIA APARECIDA 99223-2000 / 98450-8026" parts = re.split(r' (?=\d)',text, 1) print(parts)
Output:
['MARIA APARECIDA', '99223-2000 / 98450-8026']