Remove all characters after

Advanced Renamer forum
#1 : 05/04-13 14:20
Dirki
Dirki
Posts: 11
How can I archieve to remove all the signs after the first combination in the file name of the first "_" and the first numeral, e.g. "1" (e.g. "_1", "_2"," _3"...) having a dot after the first or second numeral (e.g. "_1." or "_10."), including removing this combination to get a clean file name.

And additional:

Some examples:

Das_Haus_der_Daemonen_13.03.27_22-00_sixx_100_TVOON_DE.mpg.avi
Im_Netz_13.03.27_20-15_ard_90_TVOON_DE.mpg.avi
True_Lies_Wahre_Luegen_13.03.27_22-40_kabel1_170_TVOON_DE.mpg.avi
Transsiberian_13.03.18_21-55_arte_115_TVOON_DE.mpg.avi
Arachnophobia_13.03.16_15-50_rtl2_110_TVOON_DE.mpg.avi
Das_Yakuza_Kartell_No_Way_Back_13.03.18_01-20_orf1_85_TVOON_DE.mpg.avi
Eagle_Eye_Ausser_Kontrolle_13.03.17_20-15_orf1_105_TVOON_DE.mpg.avi
Mel_Brooks_Spaceballs_13.03.17_20-15_rtl2_100_TVOON_DE.mpg.avi
Flawless_Ein_tadelloses_Verbrechen_13.03.18_03-20_sf2_100_TVOON_DE.mpg.avi
Haus_der_Spiele_13.03.18_03-35_zdfkultur_115_TVOON_DE.mpg.avi
Daybreak_Katastrophe_in_L_A__13.03.17_15-10_tele5_115_TVOON_DE.mpg.avi
Vulkanausbruch_in_New_York_13.03.16_21-50_rtl2_105_TVOON_DE.mpg.avi
Sneakers_Die_Lautlosen_13.03.17_22-40_3plus_140_TVOON_DE.mpg.avi
Columbo__Loesegeld_fuer_einen_Toten_13.03.17_22-10_srtl_130_TVOON_DE.mpg.avi
Die_Feuerschlange_13.03.05_03-15_rtl2_85_TVOON_DE.mpg.avi
Missbraucht_Nachts_kommt_die_Angst_13.03.09_01-00_zdf_95_TVOON_DE.mpg.avi
Hinter_blinden_Fenstern_13.03.09_03-45_zdfneo_90_TVOON_DE.mpg.avi
24_Stunden_Angst_13.03.06_23-15_kabel1_125_TVOON_DE.mpg.avi
Stealth_Unter_dem_Radar_13.03.04_22-20_kabel1_140_TVOON_DE.mpg.avi

So it should look like:

Das_Haus_der_Daemonen.avi
Im_Netz.avi

Respectively, at the end:
Das Haus der Daemonen.avi
Im Netz.avi


And does one receive e-mail notifiacation on new replies on this forum? Could I activitate it?


05/04-13 14:20 - edited 05/04-13 20:46
#2 : 06/04-13 21:47
Kim Jensen
Kim Jensen
Administrator
Posts: 883
Reply to #1:
Try to add the Remove Pattern method and configure it like this:
Pattern: _\d\d\..*
Use regular expressions: Checked
Apply to: Name

It removes anything from and underscore + two digits and a dot. If some dates are formatted differently you will need another pattern.


06/04-13 21:47
#3 : 07/04-13 01:51
Dirki
Dirki
Posts: 11
Reply to #2:

Many thanks, Kim,

It works great.

<<<It removes anything from and underscore + two digits and a dot. If some dates are formatted differently you will need another pattern.

So, if there were one digit and a dot, I additionally could open a new "Remove pattern" box, same settings like the first one and add (instead of "_\d\d\..*") that: _\d\..*

And does one receive e-mail notifiacation on new replies on this forum? Could I activitate it?

Many thanks again.


07/04-13 01:51
#4 : 07/04-13 19:27
Kim Jensen
Kim Jensen
Administrator
Posts: 883
Reply to #3:
Yes you are right. You can add an extra method with that pattern.

Unfortunately it is not possible to get notifications when new replies are added. It is still on my todo list.


07/04-13 19:27
#5 : 07/04-13 19:37
Dirki
Dirki
Posts: 11
Reply to #4:

Thank you, Kim,

OK, no notifications, so I periodically just have to have a look at my own postings.

Thanks again


07/04-13 19:37
#6 : 21/09-13 15:35
Pierre
Pierre
Posts: 3
Reply to #5:
Hello,

I am trying to remove everything after a year such as (2012). I have used the following
REMOVE PATTERN
(\d\d\d\d).*
RegEX

but unfortunatly it deletes the 4 digits of the year

exemple:
Brazil (2103) taken by John ==> Brazil (

I am looking for
Brazil (2103) taken by John ==> Brazil (2013)

Thank you!


21/09-13 15:35
#7 : 23/09-13 08:28
Kim Jensen
Kim Jensen
Administrator
Posts: 883
Reply to #6:
Try using the replace method instead and replace the pattern with
\1
The \1 will insert the part matched by ( )


23/09-13 08:28