NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand RegEx evaluation fails.

Hi! 

When using regular expression in teststand it fails. I am trying to get Stats : READY from the string using regular expression as (Status)\s:\s(READY). Although in the attachment I just tried to get READY and that too is not passing. 

Any suggestions on what is causing this?

Thanks!!

*************************************************
CLD
*************************************************
0 Kudos
Message 1 of 7
(1,092 Views)

Does anyone has any suggestions on why this regular expression is not evaluating and teststand returns Failed status?

*************************************************
CLD
*************************************************
0 Kudos
Message 2 of 7
(1,056 Views)

I think the problem is that it's not clear what you are asking for.  Is this in a String Value Test step?  Or just an expression in TestStand.

 

What do you mean by "not passing"?  It's not doing what you want or the sequence context status is being set to Failed?

 

Maybe you could give us some more context?   Like specifically what are you expecting back from your code module and what is considered passing vs failing?

 

Thanks,

 

 

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 3 of 7
(1,050 Views)

It is a string value type.
I am trying to use regular expression to validate a part of the string that is returned in Step.Result.String from the code module.
So the String is 

IMEI : 00009999222 Status : READY

 

The regular expression that I have is (Status\s:\sREADY)

 

I notice when I set the UseCompExpr to False, the Step.Status is Failed (previous image)
If I set UseCompExpr to True, it returns Invalid for Comp field (image attached)

All I am trying to achive is to pick the Status\s:\sREADY from Step.Result.String.

Thanks!!

*************************************************
CLD
*************************************************
0 Kudos
Message 4 of 7
(1,040 Views)

Any suggestion as to what is incorrect in performing the regEx?

Thanks

*************************************************
CLD
*************************************************
0 Kudos
Message 5 of 7
(1,024 Views)

I got it to work as follows.  It seems the Regular Expression has to match everything in the input string.  I know with Match Pattern in LabVIEW you can specify part of the string (as you had done) and it will work.

 

 

Teds_1-1658934306848.png

 

PH

Message 6 of 7
(1,019 Views)

Thank you so much, that works although it is interesting that teststand can't return groups.

*************************************************
CLD
*************************************************
0 Kudos
Message 7 of 7
(1,010 Views)