How to: 12-34-56 -> 123456 ; 1.23.45-> 012345

Advanced Renamer forum
#1 : 26/08-11 11:31
arwul
arwul
Posts: 82

Am puzzling on the following

Filenames contain :
space 12-34-56 to be replaced by 123456
-12-34-56 to be replaced by 123456
-1.23.45 to be replaced by 012345

I can't just do a replace '-' with nothing, as there are more '-' in the filenames.

Any suggestions?

I can do a regex search like
\d\d.\d\d.\d\d
\d\d-\d\d-\d\d

etc.

but then..?

tks
==


26/08-11 11:31
#2 : 29/08-11 21:40
Kim Jensen
Kim Jensen
Administrator
Posts: 771
Reply to #1:
What you could do is use a regular expression replace as you suggest.

Your search pattern should be something like:
(\d\d).(\d\d).(\d\d)

and you replace pattern should be:
\1\2\3

That will divide the pattern into three parts divided by a dot and replace the while thing with the three parts not divided by anything.

I hope this solves your problem.


29/08-11 21:40