I have a bunch of strings that I need to clean, and it has the following patterns:
12345SNET1
1234567SNETA2
123456SNET3
The headache is that, anything after SNET could be any integer from 0 to 9, and it could also be a char from A-Z plus an integer from 0 to 9.
Is there anyway to use regex to detect if the string has this pattern so I could use:
if regex detect (returns True):
str = str[:-1]
elif regex detect (returns True):
str = str[:-2]