NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Validate string result by reglar expression

Solved!
Go to solution

Hi

 

I have to validate a string result in teststand.

The result is a String like this 00:02:15:1x:yz:qp, where x can be in the range 0-9 or a-f or A-F. The same for y, z, q and p.

How do I test for that?

For 00:02:15:1 i can just type "00:02:15:1" in Expected String Value:

But how do I test for the rest?

I know that I can use regular expressions like [0-9a-fA-F], but I can't write that into Expected String Value: directly.

 

Thanks in advance.

 

Bjarne

 

0 Kudos
Message 1 of 2
(2,008 Views)
Solution
Accepted by topic author Briton

That isn't possible using the standard String Value Test.  Any kind of advanced string comparison should be done in a code module.  You could ake the test a Pass/Fail test and your code module use regular expressions to determine pass/fail.  Alternatively, you could create a custom step where the code module is used as a post-step substep.  

Message 2 of 2
(1,989 Views)