Enhancement request - Replace count backwards? - Replace underscores in exif added into filenames
I have added the exif tags "'<ExifTool:Title>'" and then "(<ExifTool:Duration>)" into filenames.
I want to change the duration format from "0_00_00" to "0h00m00". (Note: this same format could also be in the added Title!)
I tried using the replace box, but there are an unknown number of underscores in the imported Titles, so the position of the underscore cannot be set using the 1st/2nd box from the start.
It could be set from the end, if there was a backwards tick box?
Or is there another way to achieve this please?
Many thanks, Vicki (v3.88)
I want to change the duration format from "0_00_00" to "0h00m00". (Note: this same format could also be in the added Title!)
I tried using the replace box, but there are an unknown number of underscores in the imported Titles, so the position of the underscore cannot be set using the 1st/2nd box from the start.
It could be set from the end, if there was a backwards tick box?
Or is there another way to achieve this please?
Many thanks, Vicki (v3.88)
Read the User Guide: https://www.advancedrenamer.com/user_guide/regular_expresion s
Simply replace (\d)_(\d{2})_(\d{2}) with \1h\2m\3
Simply replace (\d)_(\d{2})_(\d{2}) with \1h\2m\3
Reply to #2:
Thank you for that, i will have a go at learning regex... my concern is that similar patterns in the imported titles may be replaced if I don't specify the position?
A "Backwards" tick box would be a much simpler solution, if it is not too difficult to do...
In the meantime, my workaround was to add the Titles after reformatting the duration. :)
Thank you for that, i will have a go at learning regex... my concern is that similar patterns in the imported titles may be replaced if I don't specify the position?
A "Backwards" tick box would be a much simpler solution, if it is not too difficult to do...
In the meantime, my workaround was to add the Titles after reformatting the duration. :)
Reply to #3:
Replace (\d)_(\d{2})_(\d{2})$ with \1h\2m\3
"$" signifies the end of the string so the pattern will only be matched when it occurs at the end of the filename.
Replace (\d)_(\d{2})_(\d{2})$ with \1h\2m\3
"$" signifies the end of the string so the pattern will only be matched when it occurs at the end of the filename.