Page 1 of 1

Wildcard support

PostPosted: Thu Oct 12, 2017 3:36 pm
by wclark99
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.

Re: Wildcard support

PostPosted: Thu Oct 12, 2017 4:15 pm
by therube
Assuming there would be no other underscores in the filename:

1:RegEx
Code: Select all
Match:  (.*)_.*
Replace:  \1

Re: Wildcard support

PostPosted: Thu Oct 12, 2017 4:20 pm
by wclark99
Thank you! I had to add .pdf to the \1 to complete the filename, but it worked great. :D