Using Regex to add numbers to filenames

If I wanted to rename the following files
Treasures - EP1 - Peru To Brazil.avi
Treasures - EP2 - Mexico to America.avi
Treasures - EP3 - Australia to Cambodia.avi

to this:

Treasures - EP01 - Peru To Brazil.avi
Treasures - EP02 - Mexico to America.avi
Treasures - EP03 - Australia to Cambodia.avi

How do I go about it? I tried using the following regex expression to no avail:

old : Treasures - EP(.) - (.)
new: Treasures - EP[0-9][0-9] - \2

obviously completley wrong. just to let you know i tried. :slight_smile:

Also does the sequential numbering option only tag a number onto the end?

Thanks very much. So am I right in thinking that [0-9] doesn't work in the dopus syntax @ all? # is used instead?

Cheers! :slight_smile:

[0-9] in the Find part will match any number-character from zero to nine. [0-9] in the Replace part doesn't mean anything.

Standard regexp behaviour as far as I know, although regexps are not really a standard since everyone has extended them differently, so maybe [0-9] does do something in the Replace part in some programs...

I wish ISO would standardise regexps so they work the same in every program. :slight_smile:

thanks for clearing that up. :slight_smile: