Community Member

Timezone match in templates

We have some devices configured with clock timezone UTC -5 and some devices configured with clock timezone EST -5

I need to know if there are any devices without any timezone settings. I'm using

+ clock timezone (EST|UTC) -5

in baseline templates to match both configurations. For some reason template job is unable to find any matches, even though if I run a match on + clock timezone EST -5 and it can find matches for + clock timezone UTC -5

I can match regex clock timezone (EST|UTC) -5 in raw config with a text editor. It seems that regex is correct.

What would be a fix for this problem or workaround.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: Timezone match in templates

You are not using regular expressions correctly. All regular expressions must be enclosed in [# ... #]. So, you need to do:

+ clock timezone [#(EST|UTC)#] -5

1 REPLY
Cisco Employee

Re: Timezone match in templates

You are not using regular expressions correctly. All regular expressions must be enclosed in [# ... #]. So, you need to do:

+ clock timezone [#(EST|UTC)#] -5

143
Views
0
Helpful
1
Replies
CreatePlease to create content