Hi,
I have two names and I should return the mismatched letter
John Antony
Jonh Antony
output is - nh
Hi,
I have two names and I should return the mismatched letter
John Antony
Jonh Antony
output is - nh
Hi,
you can use the following regex pattern to find the difference between two strings:
[^ \w]+
This pattern matches any non-word character that is present in the first string but not in the second string.
Here’s how you can use this pattern in UiPath:
When you run this workflow with the input strings “John Antony” and “Jonh Antony”, the output in the message box will be “nh”.
Cheers @joe2
similar to your other topic we would recommend also to specify different scenarios e.g. different string lengths etc.
Have a look here:
Hi @joe2 ,
Maybe the same methods but with slight variations :
new String("Jonh Antony".Where(Function(x,i)Not("John Antony".Substring(i,1).Equals(x.ToString))).ToArray)
Actually I am comparing certain names and i have to return the character which are mismatched
more examle scenario are as follows;
Rock Thomas
Rock Tomas
O/p-h
zose Jose
ose Jose
o/p-z
even in the above scenarios the name
John Antony
Jonh Antony
nh have replaced the places so output is nh
String Compare- mismatched string.xaml (13.3 KB)
For the current input string both doesn’t work. kindly help
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.