Ad Widget

Collapse

Regular Expressions in Triggers

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ddrager
    Junior Member
    • Aug 2006
    • 13

    #1

    Regular Expressions in Triggers

    I have a template that has a lot of items, for example:

    Code:
    D8212G-MBBBB::bcms1-cb1-current.0
    D8212G-MBBBB::bcms1-cb12-current.0
    D8212G-MBBBB::bcms2-cb30-current.0
    etc
    I created a global regular expression:

    Code:
    .+bcms.-cb..?-current.0
    With name pducircuits. Tested that it matches the strings above.

    As a trigger, tried to set up:

    Code:
    {Template_PDU:regexp(@pducircuits).last(0)}>22
    Also attempted to use:

    Code:
    {Template_PDU:@pducircuits.last(0)}>22
    (I wasn't clear from the documentation the correct way to use regexs).

    What is the correct way to use regular expressions in a trigger name, or am I going about this the wrong way?
Working...