Hello Friends , I wanted to get last from below strings…Please Help.
e.g.
- SEIDE HEROLD
- HALL JAMES ALLEN
- JOSE O PRECIADO
- JASON J OAKS
OutPut should like below (Last Name Only)
1.HEROLD
2.ALLEN
3.PRECIADO
4.OAKS
Hello Friends , I wanted to get last from below strings…Please Help.
e.g.
OutPut should like below (Last Name Only)
1.HEROLD
2.ALLEN
3.PRECIADO
4.OAKS
Hello , Thanks Actually there was extra white space …issues is resolve.
Ohhhhh…thanks …i also notice it just now…thanks…i will mark this as solution but i have to delete this Screen shoot.
To extract the last name from a string in UiPath, follow these steps using native UiPath activities like Assign and Log Message or Write Line to check the results.
lastName
.lastName
, use the Split
function to split the string by spaces and select the last element of the resulting array. For example:lastName = Split(fullName, " ")(Split(fullName, " ").Length - 1)
fullName
is the variable containing the complete name.lastName
, confirming that only the last name is extracted.This method splits the string by spaces and captures the last element.
Here is the project
Main.xaml (9.5 KB)
Thanks for response …this works too.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.