I have an name in string form , In complete name i want to skip the middle name (if there is present the middle name), and when there is only first and last name there is no requirement to change anything.
ex-1:- DANIEL JOHN HINEDXON (I want to remove john in complete name)
ex-2, MICHELE MADUXX (There is no requirement to remove anything)
Instead Splitting this data you can do it simply using an Assign Activity by assigning this code System.Text.RegularExpressions.Regex.Replace(stringVariable.Trim,"(?= ) \w+ (?<= )|(?= ) \w+ (?<= )"," ")
it’ll remove middle name check this workflow for better understanding RegexReplace.xaml (4.5 KB)