Simple Folder Rename

A swapping-ground for Regular Expression syntax

Simple Folder Rename

Postby sysadminguy » Thu Aug 31, 2017 4:32 pm

I'm not to strong with regex and I'm sure I'm missing the solution. I get get some matches but I'm not sure how to reduce to what I need.

I need to rename the folders from the pattern firstname.lastname to first initial and last name

so for example:

john.doe

becomes

jdoe

Thanks in advance!
sysadminguy
 
Posts: 2
Joined: Thu Aug 31, 2017 4:26 pm

Re: Simple Folder Rename

Postby KenP » Thu Aug 31, 2017 7:39 pm

BRU seems to recognise the .doe as a folder extension, so on the menu bar go to "Renaming Options / Ignore" and check "Folder Extensions".

RegExt (1)
Match: (\w).*\.(\w*)
Replace: \1\2

Hope this helps :wink:
KenP
 
Posts: 198
Joined: Sat Jul 30, 2016 11:25 am

Re: Simple Folder Rename

Postby sysadminguy » Thu Aug 31, 2017 7:50 pm

Perfect, that's exactly it! Thanks again!
sysadminguy
 
Posts: 2
Joined: Thu Aug 31, 2017 4:26 pm


Return to Regular Expressions