Skip to main content

FME Desktop 2020.0.0.0: How to filter based on exact two values?

 

For example, in the screenshot below, I wanted to filter all the values that exactly have the number “10” Or “11”.

 

Then why the “101”, “102”, “110” are filtered with the syntax above?

 

Clip_1351 

 

Clip_1352 

 

 

Hi Jamal,

If you are wanting the Tester to find specific values, I'd recommend using the operator "=" (Equal) instead of "Contains Regex".

image-Andrea


Hi @jamal​ 

Based on the screenshot, it appears that you have to adjust the tester to do the following

Adjust the Test Statement to "=" instead of "Contains Regex"

See attached workspace and screenshot Acad_TesterUpdateWorkbench (see attached)

 


Thank you for the help.

 

To make mor specific, in the screenshot below, I need to filter those which contains EXACTLY “,10”. This means that “,103” or “,107” shall not be filtered.

 

How this can be performed?

 

The data and workbench are attached

 

Clip_1393 

Clip_1394 

 

 

 

 

 

 


Use regex

,10$

Adding $ makes the regex look for values ending with ',10'

Maybe add a second condition (OR) for

^10,

(attribute starts with '10,').


Thank you very much for the help. It works fine

 

Clip_1407 

Clip_1408 

 

 

 


You're welcome, I'm glad I could help you.

Regex does take some getting used to.


Reply