1 2 Previous Next 15 Replies Latest reply on Sep 19, 2019 9:10 AM by Sinisa Mikor

    RegEx for Run If condition

    Gabby Gabz
      Share This:

      Hello BMC'ers,


      I'm trying to check a value on a field to see if it follows a certain pattern. Here's a sample valid input:


      Field1 = x123456


      The value should always starts with the letter 'x' and followed by a 6-digit numbers.


      I got this in my active link run-if qualification:


      'Field1' LIKE "%[x][0-9][0-9][0-9][0-9][0-9][0-9]%"


      And it doesn't work.


      I also tried these conditions:


      'Field1' LIKE "x[0-9][0-9][0-9][0-9][0-9][0-9]"

      'Field1' LIKE "%[x][0-9]{6}%"

      'Field1' LIKE "\b[x][0-9][0-9][0-9][0-9][0-9][0-9]\b" --> inserting \b for brackets


      None of them worked.


      Help is appreciated.


      PS. I've looked this up prior to posting here in the communities and found a discussion about the regex filter plugin. I don't think this is too complicated to install a plug-in so don't worry about suggesting it.




        1 2 Previous Next