How to filter exact values

Hello I need an idea!
Currently, I am using for each row to pull out the data one by one and compare them.
The reference data is [A001] and you need to check if the value retrieved by for each is [including A001].

However, among the row data, there are two values ​​[ABC A001] and [ABC A001L].

I tried to do it with .contains, but I need to import only [ABC A001], but I am importing values ​​up to [ABC A001L].
(Because [ABC 001L] also includes [ABC 001])

In this case, is there any idea to import only [ABC A001]?
(What I thought was to count the number of characters in case of getting multiple values ​​and get the value with the smallest number. :frowning: )

HI @testbb

Instead of .Contains try with .Equals

You can also try with Filter Data Table activity

Regards
Gokul

Thank you for answer.
However, I can’t use .Equals because of the possibility of other characters in the middle.
For example, [ABC] is such a case.

Hi @testbb

image

Try with contains in the filter data table activity

variables:

strFilter = "ABC A001"
strPattern = strFilter & "\b"

Assign Activity:
dtFilter | DataType: DataTable =

(From d in YourDataTable.AsEnumerable
Let v = d("YourColNameOrIndex").toString
Where System.Text.RegularExpressions.Regex.isMatch(v,strPattern)
Select r = d).CopyToDataTable

Handling possible empty filter results we do:
:ambulance: :sos: [FirstAid] Handling of The source contains no DataRows exception - News / Tutorials - UiPath Community Forum