I have the following example text:
60CC
60 cc
60cc2
60CC(2)
and the following regex to match these instances:
(60\s?(cc)(\w|\(.\)){0,5})
however my output is as follows for the first match:
['60CC', 'CC', None]
(Demo of the sample regex & data.)
how do I limit the output to just the first item?
I am using Python Regex. the snippet of my python code is:
re.findall("(60\s?(cc)(\w|\(.\)){0,5})", text, flags=re.IGNORECASE)