Wild Card Question

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

Wild Card Question

Postby TMWalton69 » Mon Aug 25, 2014 1:40 am

I have a batch of file names that follow this naming convention:

LastName_FirstName_DOB_ParentLastName_ParentFirstName.pdf

I need to remove the Parent Last Name and Parent First Name information from the file names. I can't utilize the Remove Last because all names will vary in character length. Is there anyway to remove characters after the _ by using a wild care or other setting?

Even if I have to take two passes... I need the final file name to be: LastName_FirstName_DOB.pdf
Thanks so much!
Toby
TMWalton69
 
Posts: 2
Joined: Mon Aug 25, 2014 1:30 am

Re: Wild Card Question

Postby Admin » Mon Aug 25, 2014 3:46 am

Hi, use BRU regular expressions:

RexEx (1)
Match :
(.*)_(.*)_(.*)_(.*)_(.*)
Replace:
\1_\2_\3
Admin
Site Admin
 
Posts: 2344
Joined: Tue Mar 08, 2005 8:39 pm

Re: Wild Card Question

Postby TMWalton69 » Mon Aug 25, 2014 6:49 pm

Perfection! Thank you so much!
TMWalton69
 
Posts: 2
Joined: Mon Aug 25, 2014 1:30 am


Return to BRU Support


cron