I have a column in the format of Last Name First Name, eg Smith John. I want it to change to John Smith. Help please!
Solved! Go to Solution.
Here is how you can do it.
Formula:
REGEX_Replace([Field1], "(.+)\s(.+)", "\2 \1")
Workflow:
Hope this helps : )
Though not as clean as the Regex, here's my approach that allows for variations of Firstname and possible middlename
Worked, thank you so much!
Happy to help : ) @veronikababiciute
Cheers and have a nice day!
If I want include comma after reversing the string using regex_replace?
Hi @Meenssankar
The formula would be add comma between 2 and 1
REGEX_Replace([Field1], "(.+)\s(.+)", "$2 ,$1")
Hope this helps : )
I have never taken the time to learn regex so I just stick with string manipulation to get what I want. I just rebuilt the name by finding the space and taking what is to the right, then adding a space and then taking what is the left. Cheers!