Partial name matches

I’m using citrix applications so we are using some low version I can’t update that…is there any other approach so that it might resolve this issue

You could also consider this activity: FuzzyWuzzy - RPA Component | UiPath Marketplace | Overview
It returns similarity score (0-100) how similar are two string expressions. It also contains options for ignoring order of words and abbreviations. But I recommend to use it only when it is not possible to solve problem with basic string method and regex

@Anil_G could you pl help me on this cases Anil

@smarthari1997

So you need a fuzzy match I believe…Are you saying both names might be different? like what you compare and what is to be compared with?

I need a input name and the compared name…and if you need match like that way…then fuzzy logic is your way where you would get a percentage value and using a cutoff you can try to check matched or not

cheers

1 Like

eg 1
name1 = “MICHEAL A. PANGALANGAN”,
name2 = “MICHEAL DILIA S PANGALANGAN”,

eg 2
name 1= “William Randall Blair, JR”
name 2 = “William B”

eg 3
name1 =“Lai Wing Cheung-Nel”
name2 = “Wing Cheung”

like these names will appear def any one word will match if any word matches then its partially matches if not it not matches paritally

@smarthari1997

If you just need to check any one work is matched…then try this

Name1.Split(" "c).Any(function(x) Name2.Split(" "c).Any(function(y) y.ToLower.Equals(x.ToLower)))

This will give true even if one word matches in both

Cheers

Hi @smarthari1997

Assign -> name1= "MICHEAL A. PANGALANGAN"
Assign -> name2= "MICHEAL DILIA S PANGALANGAN"
Assign -> isPartiallyMatched= System.Text.RegularExpressions.Regex.Split(name1, "\W+").Where(Function(s) Not String.IsNullOrEmpty(s)).Any(Function(word1) System.Text.RegularExpressions.Regex.Split(name2, "\W+").Where(Function(s) Not String.IsNullOrEmpty(s)).Any(Function(word2) word2.IndexOf(word1, StringComparison.OrdinalIgnoreCase) >= 0))

Note: name1, name2 is of DataType System.String. isPartiallyMatched is of DataType System.Boolean.

Regards

Now its working Tqs Anil for you help

1 Like

Tqs for you help @vrdabberu

1 Like

When not fuzzy / other Similar approaches can be used:
grafik

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.