Dec-27-2018, 02:30 PM
metulburr Wrote:Or you could use regex, which i am horrible at.Regex is not difficult to learn and it is very powerful for some tasks
>>> import re >>> regex = re.compile( ... r"\d*" # zero or more digits ... r"E" # the letter E ... r"\d*" # again zero or more digits ... ) >>> match = regex.search('VA004L200E2T99') >>> match.group() '200E2'