I want to get part of string by regular expression I try this but it returns more than I need. This my code :
Release_name = 'My Kitchen Rules S10E35 720p HDTV x264-ORENJI'
def get_rls(t):
w = re.match(".*\d ", t)
if not w: raise Exception("Error For Regular Expression")
return w.group(0)
regular_case = [Release_name]
for w in regular_case:
Regular_part = get_rls(w)
print(">>>> Regular Part: ", Regular_part)
This code for this example " My Kitchen Rules S10E35 720p HDTV x264-ORENJI "
return this "My Kitchen Rules S10E35 " but i do not need the "S10E35" just return this My Kitchen Rules