Remove everthing before last underscore

Post any Bulk Rename Utility support requirements here. Open to all registered users.

Remove everthing before last underscore

Postby Alphastacker » Thu Nov 30, 2017 3:34 pm

I have seen similar question but couldnt find the exact answer.

I need to rename something like this: 1234_2017-06-30_Smith_Smith Group Reports.pdf

to this Smith Group Reports.pdf

So remove everything before the last underscore.

Any help would be appreciated.
Alphastacker
 
Posts: 2
Joined: Thu Nov 30, 2017 3:30 pm

Re: Remove everthing before last underscore

Postby KenP » Thu Nov 30, 2017 3:59 pm

I'm unable to test this in BRU at the moment, but it should work.

RegEx (1)
Match: .*_(.*)$
Replace: \1
KenP
 
Posts: 196
Joined: Sat Jul 30, 2016 11:25 am

Re: Remove everthing before last underscore

Postby Alphastacker » Thu Nov 30, 2017 4:10 pm

Worked perfectly. Thanks!

Is there a good RegEx cheat sheet that explains how to set these things up in BRU?
Alphastacker
 
Posts: 2
Joined: Thu Nov 30, 2017 3:30 pm

Re: Remove everthing before last underscore

Postby KenP » Thu Nov 30, 2017 9:39 pm

Alphastacker wrote:Worked perfectly. Thanks!

Is there a good RegEx cheat sheet that explains how to set these things up in BRU?

Have a read of the Getting help with Regular Expressions page.
KenP
 
Posts: 196
Joined: Sat Jul 30, 2016 11:25 am


Return to BRU Support