I try to replace "_v(anydigit)" to "_index" :
example :
file_v01.jpg to file_index.jpg
using re.sub("_v\d\d","_index",file)
or
file_v0001.jpg to file_index.jpg
using re.sub("_v\d\d\d\d","_index",file)
Those scripts works fine. But what if i don't know the digits . The number of digits is random , so it maybe _v1 or _v001 or _v023445. It should find all the digits behind the '_v' until it reach a non digit.
How can i catch it ?