To be more specific I do not know what the exact values will be.
Essentially i need to find 3 or 4 digit characters followed by the literal letter p?
ie 1080p, 720p, 576p etc…
Looked around a lot of stuff but just couldnt make it work.
Heres’ an example string
Back.to.the.Future.1985.720p.BluRay.X264-AMIABLE.mkv
In this case I want to return
Back.to.the.Future.1985.
re.search("^[^\d{3,4}p]+","Back.to.the.Future.1985.720p.BluRay.X264-AMIABLE.mkv")
however, returns
'Back.to.the.Future.'
Thanks a lot
1 Answer