Issue in iterating thr datatable

Hi,

I was iterating through a datatable and checking if it contains “ey” in one particular column.
I used . contains and if an cell value has “ey”, i filter it out.
But the issue is that if another cell having value “Hey”( which shld NOT be filtered out) is also being filtered out because it has “ey” in it.

Example is stated below:
ColumnA
Hey
Hi
Ey
Hi ey

Where columnA is a header and has 4 rows.
The desired output is

ColumnA
Hey
Hi
Hi ey

Any idea?

1 Like

Hi @Ray_Sha1 , Use .Equals instead of .Contains and check

1 Like

Hey @Ray_Sha1

Go with regex !

\sey\s

Hope this helps

Thanks
#nK

1 Like

Could you please elaborate on this one?

Hi @supermanPunch,

If in case I have a cell with value " hi and ey"
And since ey is present, I’ll have remove the value? Will .equals still work?

@Ray_Sha1 ,

Should this be a Valid case ?

.Equals will not work in this case.

If the .Equals is applied for this data, then the we should have the Expected Output as you have mentioned.

image

Hello @Ray_Sha1

How you are doing the filtering now?can you share the screenshot of the workflow which you have created?

The activity that your using for this is??

Hi, I’m iterating thr the table and using the filter activity with contains operation.

Matches is the activity.

I have used Regex101.com