You are not logged in.
Pages: 1
Hi there,
I'm sure this is very simple, but I am failing entirely to work it out.
I am trying to rename files that have a standard numbering system, which is s##e## where # could be any number. I want to replace those with ##x##. To make life trickier, I would ideally like to drop any preceding 0s from the first set of numbers, but keep them if they are in the second set.
Thus:
s01e01 becomes 1x01.
s01e12 becomes 1x12.
s12e12 becomes 12x12.
And just to clarify, these numbers may have other text before/after which needs to remain intact.
Any help would be gratefully appreciated!
Offline
I suppose you mean "where # could be any digit"?
Now I'm not a RegEx guru by any stretch of the imagination , but I suppose the following RegEx rule should work (though there might be better ways of doing the same as well):
Expression: s0?(\d?\d)e(\d{2})
Replace: $1x$2
Offline
Almost perfect, Andrew!
Here is a slightly improved RegEx, which will handle number sequences of any length:
Expression: s0*(\d+)e(\d+)
Replace: $1x$2
Offline
Pages: 1