Help

Fixing regex for lastname that contain two words

Topic Labels: Formulas
544 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Joachim_Brindea
6 - Interface Innovator
6 - Interface Innovator

Hello everyone,

I’m trying to separate firstname and lastname using formulas I found online.
My issue is that some french name are like: John De Doe

The first word is always the firstname, the rest is the lastname.

I have this formula for firstname:
IF({Nom complet}, REGEX_EXTRACT({Nom complet}, ".* "))

And I have this formula for lastname:
IF({Nom complet}, REGEX_EXTRACT({Nom complet}, "\\s(.*)"))

It outputs “John De” as firstname instead of “John”.
and “De Doe” as lastname which is what I want.

I need a formula to get first word (preferably using regex) that works with special characters.

Thank you for your help,
Joachim

0 Replies 0