Rename part of File name from First name Last name to LN FN

A swapping-ground for Regular Expression syntax

Rename part of File name from First name Last name to LN FN

Postby xsnizer » Mon Feb 11, 2019 2:13 pm

Hi Ma'am/Sir,

Good day, Kindly help me with my inquiry, is their a javascript that I can rename the part of my file name from Firt Name Last name to Last name First name, on a 1000 people?. If it is possible please help..

I appreciate your prompt attention to my request.

Xsnizer.
xsnizer
 
Posts: 3
Joined: Mon Feb 11, 2019 1:56 am

Re: Rename part of File name from First name Last name to LN FN

Postby Admin » Tue Feb 12, 2019 12:07 am

Hello,

can you post 3 examples of renaming from /to please?
Probably you will be able to do it with just Regular Expressions in BRU

thanks
Admin
Site Admin
 
Posts: 2343
Joined: Tue Mar 08, 2005 8:39 pm

Re: Rename part of File name from First name Last name to LN FN

Postby xsnizer » Tue Feb 26, 2019 5:43 pm

Example:

From:
Jon Snow
Dwight Howard
Michael Scott

Into:
Snow Jon
Howard Dwight
Scott Michael

I tried using Move/Copy but when I switched to the next name it does not do the same from previous.
Please help...
Thank you.
xsnizer
 
Posts: 3
Joined: Mon Feb 11, 2019 1:56 am

Re: Rename part of File name from First name Last name to LN FN

Postby therube » Wed Feb 27, 2019 3:04 am

Always two words, separated by a space?

If so, you could try:

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



Note that it might not be correct with "xs snizer jr." or "the rube sr."
(It would give, "jr. | xs snizer" & "sr. | the rube".)
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: Rename part of File name from First name Last name to LN FN

Postby xsnizer » Wed Feb 27, 2019 2:00 pm

Thank you it did work, GOD bless you :)
xsnizer
 
Posts: 3
Joined: Mon Feb 11, 2019 1:56 am

Re: Rename part of File name from First name Last name to LN FN

Postby vedika » Mon May 27, 2019 11:19 am

Thanks for the explaination.
It works when i used it and implemented.
vedika
 
Posts: 1
Joined: Mon May 27, 2019 11:13 am


Return to Regular Expressions


cron