Using RegEx inside class definitions

Moderator: crythias

Locked
cbruigom
Znuny newbie
Posts: 36
Joined: 17 Apr 2014, 23:38
Znuny Version: 3.3.5
Real Name: Clinton

Using RegEx inside class definitions

Post by cbruigom »

Hi All,

Does anyone know how to build a RegEx inside a class definition? Is it even possible? e.g:

Code: Select all

   {
    Key => 'Type',
        Name => 'Type',
        Searchable => 1,
        Input => {
            Type => 'GeneralCatalog',
            Class => ['[RegEx]ITSM::ConfigItem::Products::Type'],
            Translation => 1,
         },
      }, 
What I want to achieve is when i enter text into the Products field within the config item it should use regular expressions, so for example I could use the alternate operator | e.g. (Prod1|Prod2)
Locked