I want to know if there is some regular expression or something I could use that would remove instances where I have 3 letters followed by a number in a string?
For example, I have this corpus
c = [CLE2 - Single Smalls station 117,
HOU2 - mathdenn,
[SAT2] Pack Singles > Line 7 > Station 04 Kiosk Ticket - ZT410 Shipping Label Not Printing Correcly,
[HOU2] Multiple GW Stations Down in AFE2]
I would want to apply some function that will then return
c = [Single Smalls station 117
- mathdenn,
Pack Singles > Line 7 > Station 04 Kiosk Ticket - ZT410 Shipping Label Not Printing Correcly
Multiple GW Stations Down in ]
Looking for neat pythonic ways of achieving this. I read through regular expressions online a little but I have not found a way to specify I want to remove instances where we have 3 characters followed by a number, so I wouldn't say this answers my question.
I tried doing something like this:
regex = re.compile('[a-z][0-9]')
regex.findall(corpus[0])
But this just returns instances where we have a char followed by a number. Perhaps some type of modification of this?