How to give default value for regex iendurable<Match>

Hello I need to give the default value for I eneurable can any one give the answer
I need default value not null value

Thanks
Chethan P

1 Like

Hi Chethan,

Can you brief a little more?

1 Like

Sure we have extracted the email Id [1] what you give solution yesterday it will work when cherry123@gmail for this it works but if 123info@gmail it won’t work on that time we have to give a default value dear

Thanks
Chethan P


  1. A-Za-z ↩︎

@copy_writes - you can try to assign a variable in if activity based on match response like below

matched_string = Regex.Match(regex);
if(matched_string == null) {
 matched_string  = "default";
}
3 Likes

Yes I try this way but i get error like Object reference not set to an instance of an object.

Thanks
Chethan P

I got it I use try catch first I assign variableA = Ismatch_Name(0).value I place this inside try if there is null or null assign variableA=“default”
thanks to @Pradeep_Shiv and @GBK

Thanks
Chethan P

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