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

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

book

Article ID: 303956

calendar_today

Updated On:

Products

VMware Smart Assurance Network Observability

Issue/Introduction

How to match criteria for ( , ) , [ , ] , < , > in glob function always succeed in Smarts ASL.

Environment

All supported releases of Smart

Resolution

  • Add double escape characters \\ in glob for (, ), [, ], < , >

  • Example:

         data = "InCharge";
         if (glob(">", data ))
         {
                            print("TEST1: > found");
         }
         if (glob("*>*", data))
         {
                            print("TEST2: *>* found");

         }

  • Hence both 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)