Remove the text after , (comma)

Could you post your regex?

well the output of the regex will be a enumerable buddy
so we need to mention the index value to get the value at the mentioned position
like pass the output of regex to a for each loop and mention the assign activity that splits, inside the for each loop like this
–for each loop with output variable of regex as input, with type argument as object
–inside the for each loop use the assign activity and in the split methodmention like this
Split(item,“,”)(0).ToString.Trim
where item is the variable that stores the value of the regex at each index position
Cheers @balkishan

image
Here is the input bro, which is stored in a Email variable which is enumerable bro. if you observe it is separated by , (comma)

BTW sorry didn’t get your method bro…
@RobertD @Palaniyappan

What are you using in the matches activity? i want to check the regex, and see how to modify it to satisfy your needs.

bro here it extract the lot of text but using the regex I am extracting the email I’d only. so now I want to use the further condition to take only single email I’d. Hope you understand bro.

here it gives me only email address from the bulky data.

what to put in the index value?
image

Well, use Email(1), this should return the 1st email match. Not sure if the split is needed anymore.

1 Like

Bro I have to use this enumerable variable direct in the AddData Row Activity.

Previously to take both the I’d I was using this condition in the AddDataRow Activity.
And it gives me both the email I’d seprated by comma.
image

But this time I need only first Id…

I gave the condition like this is the Add Data Row Activity. Let me check if it’s worked.
image

Right me if I am wrong. My goal is to extract the first email I’d only.

Hi, it’s really worked, actually 1 give the second position. we don’t need to use any extra condition.

Hi @Palaniyappan @RobertD your solution is really worked bro.
But during this I am facing one issue it’s not mendatary we get the value always, sometime it gives me null value also, so how can I modified this condition. Please help.
see the error it means no value come from the variable/or fetching bcz there is no more info given. So I have to handle this condition also. Please help
image

I am using this condition in the case of Phone Number. so If you see now the variable has a null value. But in the If Condition we gave the condition if contains , (comma).
so when Null value we have to ignore it.
image

Use and if condition before:
if Email is not Nothing then
do all your other activities
else
do what you want to to if you have no more data.

1 Like

This is my condition what you guys suggest me. So here how can I modified it?
image

I am using this condition to get the Phone/Mobile Number bcz same issue I am facing with the Phone/Mobile number also. @RobertD

so I have to use another condition before this condition OR I can modified this condition only???

What would you assing to MobileNumber if the PhoneNum is null? You will need another condition. Can’t really modify this one.

I didn’t assign anything directly I am extract the text and give this condition to get the first mobile number only.
see below how I did this bro.
image

1 Like

And if you have no phone number?

That’s what I want to know bro, If I have no phone number value. can you please tell where and how can I use this condition. @RobertD

Fantastic
put this if condition inside another if condition within a THEN part and mention the condition like this
String.IsNullOrEmpty(PhoneNum.ToString)

if this condition gets satisfied it will go to THEN part where we can have the current if condition so that it will get evaluated or
if the above condition gets failed it will go to ELSE part where we can leave it empty

so the sequence should be like this
–Private:Get Full Text ‘SPAN’
–Write Line
–If activity with condition like String.IsNullOrEmpty(PhoneNum.ToString)
–inside the THEN part put the if with condition like PhoneNum.Contains(“,”)
Cheers @balkishan

1 Like

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