Question

Tester - filter values that contain "text. (anynumber)"

  • 27 March 2018
  • 3 replies
  • 28 views

Badge

I would like to ask how can I filter data by using Tester consider condition:

ATTRIBUTE_ABC - contains - "max. 1" or

ATTRIBUTE_ABC - contains - "max. 2" or "max. 3" etc.

how can I generalize Tester by substituting number 1, 2 or 3... to don't build x number of testers.


3 replies

Userlevel 2
Badge +19

I would use the condition:

ATTRIBUTE_ABC -> Begins with -> max.

Badge

Hi @oscard

 

attribute value looks for instance like this - > abc max. 20A

 

I need to check if person who collected data didn't omit numeric value like "20A" or "40A" etc

That's why I'm thinking to use

ATTRIBUTE_ABC -> CONTAINS -> .....

However, I don't know how to create general condition for "right value" in tester.

Userlevel 2
Badge +17

Hi @vid, the "Contains Regex" operator can be used to test the pattern of string (Left Value). For example, this regex (Right Value) matches a string consisting of literal "abc max. ", one or more number, and literal "A".

^abc max\. \d+A$
  • "abc max. 20A" -> Passed
  • "abc max. 20B" -> Failed
  • "abc min. 20A" -> Failed

and so on

Reply