10-23-2022 01:23 PM - edited 10-23-2022 01:23 PM
From the TS Idea Exchange, regular expression comparison type was introduced with TestSTand 2020. But I can't get this function to work as expected (tested in TestStand 2020 & 2021), is this function not working at all or am I doing something wrong here? The function used is CheckStrLimit, but this functions returns Failed even for the simplest expression.
10-28-2022 02:45 AM - edited 10-28-2022 02:55 AM
Hi Hunkel,
You should make your Reg to meet your needs like only check last two characters, it should be ".*OK$" if input is "Yada yada yada, OK"
It seems TS use "match" not "search" to do the reg ~
ret = re.match(".*OK$","Yada yada yada, OK") #
print(ret.group()) # Yada yada yada, OK
ret = re.search("OK$","Yada yada yada, OK") #
print(ret.group()) # OK
Thanks,
Ricky