Skip to main content
Participant
June 17, 2019
Answered

Batch Rename - 2nd Hyphen

  • June 17, 2019
  • 2 replies
  • 903 views

I feel like there's probably an easy answer to this question but I couldn't find one in my search. I need to change the 2nd hyphen in these file names to an underscore. How would I make Bridge skip the first hyphen? I've attached a screenshot.

This topic has been closed for replies.
Correct answer SuperMerlin

From is:-

(.+-CHE)(-)(.+)

Or:

(.+-.+)(-)(.+)

2 replies

Stephen Marsh
Community Expert
Community Expert
June 17, 2019

I’d usually use capture groups as in SuperMerlin’s examples as I find them more intuitive than lookarounds, however, I pushed myself to find an alternative:

Find: -(?=\d+)

Change: _

Participant
June 17, 2019

That works as well! Definitely saved me some time. THanks.

SuperMerlin
SuperMerlinCorrect answer
Inspiring
June 17, 2019

From is:-

(.+-CHE)(-)(.+)

Or:

(.+-.+)(-)(.+)

Participant
June 17, 2019

That works! Thanks.