Wildcard support

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

Wildcard support

Postby wclark99 » Thu Oct 12, 2017 3:36 pm

I have files that have revisions on them shown as _A, _0B, _2E. I want to remove the _* from the .pdf file. I have tried replacing _* with nothing and nothing happens in the new name field. I have tried Matching _*.pdf and replacing with .pdf, including extension. I have tried playing with parenthesis () in all sorts of variations, to know avail. Would someone please let me know what I am doing wrong?

Example: 0210-G-10004-001_A.pdf - want to remove the underscore and any following characters, in this case _A. Is the Underscore subject to special character rules? I would appreciate some help. Thanks.
wclark99
 
Posts: 3
Joined: Thu Oct 12, 2017 3:17 pm

Re: Wildcard support

Postby therube » Thu Oct 12, 2017 4:15 pm

Assuming there would be no other underscores in the filename:

1:RegEx
Code: Select all
Match:  (.*)_.*
Replace:  \1
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: Wildcard support

Postby wclark99 » Thu Oct 12, 2017 4:20 pm

Thank you! I had to add .pdf to the \1 to complete the filename, but it worked great. :D
wclark99
 
Posts: 3
Joined: Thu Oct 12, 2017 3:17 pm


Return to BRU Support