Rename file names for photo import

A swapping-ground for Regular Expression syntax

Rename file names for photo import

Postby jolivette313 » Mon May 15, 2017 8:08 pm

My badge system saves files as fistname-lastname.jpg
Some names have hyphenated names so when I rename using the replace it will change both hyphens to dot.

example:
lucy-smith-thomas.jpg
need it to be
lucy.smith-thomas.jpg

Greatly appreciate any help.
jolivette313
 
Posts: 2
Joined: Mon May 15, 2017 8:00 pm

Re: Rename file names for photo import

Postby KenP » Mon May 15, 2017 8:31 pm

This should work.

RegEx (1)
Match: ([^-]*)-(.*)
Replace: \1.\2
KenP
 
Posts: 198
Joined: Sat Jul 30, 2016 11:25 am

Re: Rename file names for photo import

Postby jolivette313 » Mon May 15, 2017 8:47 pm

That worked. Thanks so much for the quick response.
jolivette313
 
Posts: 2
Joined: Mon May 15, 2017 8:00 pm


Return to Regular Expressions