#1 2008-05-17 09:42

ozzii
Senior Member
Registered: 2007-07-04
Posts: 101

Rule for moving a part at the begining/end

Hi,
I would like to know if it's possible to find a certain part and move it at the beginning/end of the file name ?

Explanation:
I have for example this:
aaa.bbb.100.TEST.ext
ccc.ddd.200.ext

I would like to have a rule for this, if there is TEST into the filename:
TEST.aaa.bbb.100.ext
ccc.ddd.200.ext (this is not changing because no TEST into the filename)

I do some more regex here and after a rule for moving the TEST at the end:
aaa.bbb.100.TEST.ext
ccc.ddd.200.ext

So basically rules for:
- Find TEST and move to the begining
- Find TEST and move to the end

Any help ?


_________________
Do, or do not. There is no 'try.'" --  Jedi Master Yoda

Offline

#2 2008-05-17 15:42

krtek
Senior Member
From: Łódź (Poland)
Registered: 2008-02-21
Posts: 262

Re: Rule for moving a part at the begining/end

Hi Ozzi,
It is possible and it's quite basic. Here you go.
Both RegEx rules.

Moving TEST to the beggining:
Expr.: (.+)(TEST)(.+)?
Replace: $2$1$3
You can also ad space to seperate TEST from the rest; replace: $2 $1$3

Moving to the end:
Expr.: (TEST)(.+)
Replace: $2$1

In both cases you need to skip extention.

Last edited by krtek (2008-05-17 15:46)


Regular Expressions are not as hard to understand as you may think. Check ReNamer's manual or nice Regular Expressions tutorial for more info and start to use full power of applications that use them (like ReNamer, Mp3Tag and so on).

Offline

#3 2008-05-17 16:25

ozzii
Senior Member
Registered: 2007-07-04
Posts: 101

Re: Rule for moving a part at the begining/end

So easy and basic tongue

But what can I do : I don't know Regex sad

But thanks to you all, I learn some things cool


_________________
Do, or do not. There is no 'try.'" --  Jedi Master Yoda

Offline

#4 2008-05-17 17:26

krtek
Senior Member
From: Łódź (Poland)
Registered: 2008-02-21
Posts: 262

Re: Rule for moving a part at the begining/end

You're misinforming tongue

Ozzi wrote:

I do some more regex here and after...

big_smile


Regular Expressions are not as hard to understand as you may think. Check ReNamer's manual or nice Regular Expressions tutorial for more info and start to use full power of applications that use them (like ReNamer, Mp3Tag and so on).

Offline

Board footer

Powered by FluxBB