Solved

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

  • 17 December 2021
  • 6 replies
  • 1 view

Badge +5

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 

 

 

icon

Best answer by geomancer 20 December 2021, 20:22

View original

6 replies

Badge +10

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

Badge +8

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)

 

Badge +5

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 

 

 

 

 

 

 

Userlevel 4
Badge +35

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,').

Badge +5

Thank you very much for the help. It works fine

 

Clip_1407 

Clip_1408 

 

 

 

Userlevel 4
Badge +35

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

Regex does take some getting used to.

Reply