How to check whether string is there or not


I want to check whether string is present or not… for example if string1=“Aparna_199901_-Fresher-_1” and string2=“Aparna”… i used if(string1.contains(string2)) but it throws else statement… if anyone knows help me


I don’t see anything wrong in your logic considering the string values(Aparna) are exactly the same. Can you paste the screenshot?


Hi there @Sunitha_Bist,
You are spot on with how to achieve this.

I have tested it in the below example and can confirm it works as expected:
Main.xaml (7.5 KB)

Can you provide any additional information?


Use isMatch activity and pattern as (.* )string2(.* ) and input as string1
Use RegexOption as IgnoreCase

Return value : boolean


Hi vvaidya, Mr_JDavey

Im getting error like this


hi aksh1yadav,
Yup your ans is right thts way i changed and tried it… it got resloved


Hi all,
Sorry I’m getting the answer… TQ FOR ALL


have you check with is match in search pane?



According to my perspective you are getting that because you are using throw activity to throw exception with user assigned exception message.


closed #10