Hi Champions,
I want to write a script to remove the last letter from First name if name ends with s.
For eg:
Dear Janis -> Dear Jani
Dear Kaspars -> Dear Kaspar
Dear Karlis -> Dear Karli
Any help here is much appreciated.
Solved! Go to Solution.
OK, sounds like Velocity is the way to go.
#set( $lead.friendlyFirstName = $lead.FirstName.replaceFirst("(?i)s$","") )
${lead.friendlyFirstName}
Easily done in Velocity, but what’s the actual use case here? Did you have a bad data load?
This is a salutation rule in Latvia, we intent to use local language salutation rules in email.