You are not logged in.

#1 2014-02-10 10:50:15

mamr
Member
Registered: 2008-08-16
Posts: 63

[Solved] Regular expressions: find specific hyphen

I have these kind of files:

14-Some Song.mp3
2012-10-Some document.odt
2012-10-03-Another document.odt
2012-10-03-Some document with another - hyphen.odt

I installed KRename and try to find and replace the hyphen after the the date/track number with empty spaces and a hyphen. The files should look like the following:

14 - Some Song.mp3
2012-10 - Some document.odt
2012-10-03 - Another document.odt
2012-10-03 - Some document with another - hyphen.odt

Other hyphens should not get touched. I don't get which regular expression I would use for find and for replace. For the mp3s I tried it with this:

^[0-9]{2}-

But what do I need to enter in the replace field? Any help?

Last edited by mamr (2014-02-10 15:56:27)

Offline

#2 2014-02-10 13:23:57

masolit
Member
Registered: 2013-12-24
Posts: 46

Re: [Solved] Regular expressions: find specific hyphen

.

Last edited by masolit (2019-12-03 16:12:37)

Offline

#3 2014-02-10 15:56:10

mamr
Member
Registered: 2008-08-16
Posts: 63

Re: [Solved] Regular expressions: find specific hyphen

Thank you!

Offline

Board footer

Powered by FluxBB