Match criteria for ( , ) , [ , ] , < , > in glob function always succeed in Smarts ASL
search cancel

Match criteria for ( , ) , [ , ] , < , > in glob function always succeed in Smarts ASL

book

Article ID: 303956

calendar_today

Updated On:

Products

VMware

Issue/Introduction

Symptoms:




Match criteria for ( , ) , [ , ] , < , > in glob function always succeed in Smarts ASL

Environment

VMware Smart Assurance - SMARTS

Resolution

add \\ in glob for (, ), [, ], < , >
Example:
     data = "InCharge 6.2";
     if (glob(">", data ))
     {
                        print("TEST1: > found");
     }
     if (glob("*>*", data))
     {
                        print("TEST2: *>* found");
     }
TEST1 and TEST 2 will print.
Both will default to TRUE even if > is not with in data.  The proper matching criteria is with double escape characters.
Example:
     glob("\\>", data) or glob("*\\>*", data) is correct.