I have a string1=“Apple_Fruit,Grapes,Banana” and string2=“Apple” I want to check if exact string2 is contains in string1…Output=False
Apple is their in Apple_Fruit so its not working
Hello @aparna30
Try this
Use Split Condition for each activity.
Strings.Split(String1,",")
For each loop use condition
Item=string2
It should give false as output because Apple is not equal to Apple_Fruit right???
You are right but again I want to skip this checking for 1 st value Because in this string1 and string 2 first value will be same right? I just want to skip this checking for the first item in string1
@aparna30
Trty this
Strings.Split(String1,",")(1).tostring=string2
**Define**
Grapes=Apple ---> Output =>False
Strings.Split(String1,",")(2).tostring=string2
Banana= Apple ---> Output=> False
Refer to this XAML file, you may get some idea
Split.xaml (11.0 KB)
@aparna30 , Also try this Regex Is Match
System.Text.RegularExpressions.Regex.IsMatch(string1,string2+"$|"+string2+",")
Hi @aparna30
I will gave simple solution for this.
The first one make as list. The list contains list= new List(of string)(new string(){“Apple_Fruit”,“Grapes”,"Banana”})
The second value make it as string datatype. it contains str = “Apple”.
You need use this function list.contains(str)
The result is false
Please refer the below image
Hope you got the answer