I'm cleaning up filenames, e.g.
from
zx5-565x372.jpg?642e0d
to
zx5-565x372.jpg
Specifically, I want to remove the ? followed by 6 lowercase alphanumeric characters.
I've tried regex like
modified = original.replace("\?\w{6}", "")
where \w is same as [a-zA-Z0-9_] and {6} is 6 of the same but with no joy.
Could someone kindly show me the right way?