check if string contains text from an array without using for each
Input : 1234 boulevard street
array = {street, avenue , road}
output = true → input has street
Input : 1234 boulevard traft
array = {street, avenue , road}
output = false -->> the input does not contain any item from an array
is there a way we can check this without using for each ?
Hi @AhmedKutraphali
Yes Let me share the code with you
Thank you
ppr
(Peter Preuss)
4

yourArrayVar.Any(Function (x) YourStringVar.Contains(x))
2 Likes
can you please post the code @ppr , so I can easily copy it instead of the image . Thank you .
Hi @AhmedKutraphali
Array.Find(arr,Function (Strr) Strr.ToString.Contains(“searchitem”))
Thanks
system
(system)
Closed
8
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.