@Sriram07, fisrt of all , welcome to our community!
Based on your example try this :
populated the variable string “strFullName” by using “get text” or using your method to set this string. After that, create 2 strings FirstName and LastName and use the assign activity
@DiegoTurati
thanks for the reply!!!
In some documents it will vary like
ex1: salman r khan and sharukh r khan
soln : fname = salman r and sharukh r
lname = khan
Ex2 : salman khan
fname : salman
lname : khan
Ex 3 : mumaith khan and salman khan
fname : mumaith and salman
lname : khan
Actually i need logic for how can i split that EX1 as fname as salman r and sharukh r
And effectively i want to find the common word in Ex1 and Ex2 how can i find the common words in one string thats my lastname easily!!!
Its helped me to solve thank you and i want to know that how to find the common words in a string like
Ex1 : amithabh bachan and abishek bachan
soln should be “bachan”
In order to get the common names, first split each word in the string and add to an array. Then compare 2 arrays.
for eg,
Assign String array, Str_Array1 = String1.Split(" "c)
String Array, Str_Array2=String2.Split(" "c)
If you want to get the common names as a single string,
Assign String Common= String.Join(" ",Str_Array1.Intersect(Str_Array2).ToArray)
Just like i/p → “sharukh s khan” and “salman s khan” ;output string= “s khan”
If you want to get each common word separately,
Assign string array, Common_Arr= Str_Array1.Intersect(Str_Array2).ToArray
Common_Arr(0), Common_Arr(1) etc will return the common values, otherwise loop through a “for each” activity in the array “Common_Arr”.
Thanks for the this post. Great and I have used it for my scenario.
I need help on one of my scenario.
I have to extract the Name field from the app which has first name and last name together. Say like if i get middle name also in some scenarios , Still i can use the same logic to split?. Any help would be great.
do you find any delimiter like space or any comma based on that you can split the name into array and check the count based on count you can extract first name , last name and middle name