For eg,
In string i have,
String=sri g ram
I want to extract only sri and ram i.e first and last name into one string like this sri ram.
Can anyone help how to achieve this?
You can try with Split epression
Split("sri g ram"," ").first
Split("sri g ram"," ").Last
Regards
Gokul
1 Like
Thanks.after that how to get like this firstname lastname)i.e sri ram
Checkout the expression
System.Text.RegularExpressions.Regex.Replace(YournameString,"(?<=\S\s)\D+(?=\s\S)","")
Regards
Sudharsan
You can split the name using Space and get the first and last items from the list.
FullName.Split(" "c).Last()
FullName.Split(" "c).First()
Same split expression you can try
Regards
Gokul
No.we got firstname and last name separately in 2 strings right.how to join first and last names in single string?like i want string=sri ram
Use Assign activity Join the string
OutputVariable = Split("sri ram"," ").first+" "+Split("sri ram"," ").last
Regards
Gokul
You can also use this , This will get the name in the single line @vnsatyasunil
Regards
Sudharsan
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.