STR_MATCH function delivers inconsistent results

Document ID : KB000087828
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
Error Message :
N/A

The STR_MATCH function delivers inconsistent results in early version 11.  The behavior has been duplicated in version 11.2.2, but not 11.2.3 or above.

Investigation

The following snippets show the behavior and how to test if you are affected.

Setup test values
:set &string# = "asdf"
:set &string# = str_trim(&string#)
:set &empty# = ""
:print "string -&string#-"
:print "empty -&empty#-"

All three matches should result in N
:set &match1# = str_match(&string#, &empty#)
:print "match1 &match1#"
:set &match2# = str_match(&string#, "")
:print "match2 &match2#"
:set &match3# = str_match(&string#, &empty#)
:print "match3 &match3#"

Actual Results:
One match results in Y.
U00020408 string -asdf-
U00020408 empty --
U00020408 match1 Y
U00020408 match2 N
U00020408 match3 N

Expected Results:
All three matches should return N.
U00020408 string -asdf-
U00020408 empty --
U00020408 match1 N
U00020408 match2 N
U00020408 match3 N
Environment:
OS Version: N/A
Cause:
Cause type:
Defect
Root Cause: STR_MATCH function fails to return correct results in version 11.2.2, but functions correctly in 11.2.3 and above.
Resolution:
Update to a fix version listed below or a newer version if available.

Fix Status: Released

Fix Version(s):
Automation Engine 11.2.3 - Available
Additional Information:
Workaround :
N/A