String(Character) Partial match

Hi Community,

I was trying to match (partially) list of strings into another list of strings having similar string or say characters, but string contains always returning false? Help please. Thanks

Hi, none of your strings contain ‘‘layer 1’’ etc that is the exact string you’re searching for.

Hi Jonathan thanks for prompt response, yeah the end goal is if one of each list contains similar character it will return true for example:

Layer s 1 vs Layer 1 should return True because they have same “Layer”?

Then it would not be the right way of approaching the issue, as you’re comparing the entire string, if you however chop both strings up and compare each character i guess it would be doable :slight_smile: I’ll try and make an example in a little while :slight_smile:

Something like this might be what you’re after:

Note that adding together a string "Layer " and a number “(1…5)” automatically turns it into a string making “String from Object” unnecessary. The index of the largest number in the CountTrue node is thus the index of the most fitting compared string. :slight_smile:

1 Like