How can we get certain field from get text activity and match 80% of the text?

When I use get text acitivity, I get the whole contain. But I only want one field “trade_name_eng”. I want to match that field against the text I get from database. For example, I get Samrat(my name) from database, and I want to check if it is available in the site. I want to update even if it is only 80% matching. Say, if the name in the site is Samraat Maharjan instead of Samrat Maharjan (I still want it to get matched). When I use Contains(variable) it doesn’t get match for obvious reason.

Hey @Samraat_Maharjan1 ,

The test which you have attached as a screenshot is in simple string format or is in json format.
If it is simple string you can write a regex to get the required value against the text.
if it is json, then you can deserialize the json string and access the required value by the key. as json comes in key value pair.

Thanks,
Sanjit

it’s in the json format. so, how can I use Json deserialize to extract that text only? Btw , I am getting this value from Dev tools>> network>>response

Hey @Samraat_Maharjan1 ,

Have a look at this thread.

Thanks,
Sanjit

Okay. I have tired that, and I worked quite well. How do I maintain at least 80% accuracy. Basically, I want to match the text with at least 80% match. Samraat Maharjan will get matched will Samrat Maharjan.

To achieve that you may need to apply Levenshtein Distance Algorithm so for that there is a marketplace activity you can use that as well.

it says [No compatible version with Windows projects]

can you the below post to compare two strings and get the difference

https://forum.uipath.com/t/compare-two-string-and-finding-the-difference/539481

Once you retrieve the characters then you can compare the length of different character to the length of initial main text

Regards

But I need to find it in percentage. How do I think using the method mentioned by you.

are you able to get the difference characters length

then you can simply write if condition like (lenghtofdiff/lenofinitialstring)*100 >80 will give you result

here lengthofdiff , lenofinitialstring both are number type

Regards

This looks tedious method. Is there any easy method?

which method you are referring to?

getting the different letters or getting the percentage of difference?

Regards

comparing two words (strings).

sorry i am not aware of any solution other than this

in this case , it is already built you can simple copy paste to your flow and use with small modifications

any how if that does not meet you requirement , hope any other member will provide a better solution

Regards