#11 2007-12-07 16:35

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Delete last part

Expression: (.+)(\.\d+).*
Replace: $1$2

aaa.104.aaa.bbb.ccc.txt         aaa.104.txt
aaa.104.aaa.txt                 aaa.104.txt
aaa.aaa.103.aaa.txt             aaa.aaa.103.txt
aaa.aaa.104.txt                 aaa.aaa.104.txt

Just make sure it satisfies your real files.

Offline

#12 2007-12-07 16:45

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

Re: Delete last part

YES, again.

This is it.

Just a * instead of +  tongue
I have try a lot of things but not this.

Thanks Stefan and den4b (creator of this "SO GOOD" software)


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

Offline

#13 2007-12-07 16:51

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Delete last part

Note the updated expression in the previous post: (.+)(\.\d+).* ... i also put extra "\." in front of the digits, to take into account the very first examples in this topic. This will ensure that the sequence of digits needs a DOT in front of it to be recognized as $2 (second subpattern). So all this patter will do is... strip everything between extension and the last sequence of digits which has a dot in front of them.

Anyway, glad to be of help smile

Offline

#14 2007-12-07 16:55

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

Re: Delete last part

I saw the new "\." wink
I was already put it into the old rule (from Stefan), for the exact reason that you say.
This is why the difference was just the "*"

Thanks again both of you. Really big help.


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

Offline

#15 2007-12-07 21:47

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Delete last part

Good good! Ozzii mastered the RegEx THUMBUP.GIF go ahead Ozzii, go!

Hi Denis, take your time and think about real life and x-mas. All the best for you (all)  you_rock.gif





merci_sign.gif Stefan


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

Board footer

Powered by FluxBB