String present in array list

Hi,

I have a string which is of format
str="BBA

DB9

FCM

DHA

DHH"

i need to check if the string contains the following codes, i have declared an array
arrList={“CAN”, “WAN”, “CCC”, “UCN”,“FCM”}

so the string contains FCM, but with the method i did it shows string does not contain the list,

Hi @quick_123

Try this

arrList.Any(Function(code) str_Input.Contains(code))

Output:

image

Cheers!!

1 Like

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