07-18-2022 05:39 PM
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!!
07-21-2022 01:46 PM
Does anyone has any suggestions on why this regular expression is not evaluating and teststand returns Failed status?
07-21-2022 06:04 PM
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,
07-22-2022 02:53 PM
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!!
07-26-2022 03:12 PM
Any suggestion as to what is incorrect in performing the regEx?
Thanks
07-27-2022 10:05 AM - edited 07-27-2022 10:05 AM
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.
PH
07-27-2022 12:15 PM
Thank you so much, that works although it is interesting that teststand can't return groups.