سؤال

I want to be able to do

filter {

   if [type] == "mobile" + x
   {
      ...
   }
}

where x is a string that is a number. This will let mobile1, mobile2, mobile3, etc be filtered in the same way.

Is there any way that is possible?

هل كانت مفيدة؟

المحلول

Yes, you can do with the following config

filter {
    if [type] =~ /mobile.+/
    {
        ......
    }
}

It is a regular expression, when the type has the word mobile, it will go in the if statement.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top