You are not logged in.
Pages: 1
Bonsoir à tous,
Comment ajouter un ou deux 0 à la 8ème et/ou 9ème place d’une chaine de caractères avec RegEx de ReNamer pour obtenir un nombre de 3 chiffres (dans une liste de 50 milliers de noms) ?
Ex : 201415-12.jpg devient 201415-012.jpg et 200521-6.jpg devient 200521-006.jpg
Merci
PapyGribouille
Last edited by PapyGribouille (2024-02-20 14:24)
Offline
How to add one or two 0s to the 8th and/or 9th place of a character string with RegEx from ReNamer to obtain a 3-digit number (in a list of 50 thousand names)?
Ex: 201415-12.jpg becomes 201415-012.jpg and 200521-6.jpg becomes 200521-006.jpg
These Regular Expression rules will remove the 8th zero first and then will add enough leading zeros to the second number to make it three digits long.
1) Replace expression "\A(\d{6})-0" with "$1-"
2) Replace expression "\A(\d{6})-(\d{1})\b" with "$1-0$2"
3) Replace expression "\A(\d{6})-(\d{2})\b" with "$1-0$2"
Offline
Note: It is difficult to follow your renaming logic across three separate topics which appear to be related. Perhaps it would be best to start a new thread, outline the full renaming logic and list your input filenames and desired output filenames.
Offline
Pages: 1