Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Filter all Bios Versions higher

I have a base Bios version J01 v02.25. I want to filter all the systems that have a higher version but I'm struggling with the syntax. 

Bios Version, Version higher than, 2.25

I have also tried using 0102.25 but still does not work. It does not show me any systems whatsoever when there should be over 30.

I'm also using drill down from a parent collection. It shows all the systems with no filters applied

1

Comments

4 comments
Date Votes
  • Sebastian,

    I think the "version higher than" comparison assumes a format of only numbers and periods. You can try doing this with Regex, this filter should match your scenario of anything higher than J01 v02.25:

    Computer > BIOS Version > Matches Expression > ^([a-zA-Z0-9]{3,5} v)((02)(\.)(2[6-9]|[3-9][0-9])|([0-9][3-9]|[1-9][0-9])(\.)([0-9]{2}))$

    Obviously this is messy and the regex filter is kinda tricky, so this solution is not ideal. Hopefully someone else has a better idea. If you want me to explain the regex filter let me know.

    2
  • lnichols Thanks very much Luke. I'm looking at that and trying to decipher it but can't really get a grasp in what it's doing :D 

    If you could briefly explain it that would be brilliant. If not, it's no worries - thanks again

    1
  • Ok, let's break it down. First, the metacharacters:

    • The caret at the start means start of line.
    • The dollar sign at the end means end of line.
    • Parentheses are used to indicate a capture group. Basically, capture groups are individual sections that the regex matches on, so in our case we are looking at the following capture groups:
      The first is the "J01 v" section. We basically want to ignore this portion so we can just filter on the latter portions.
      The next capture groups are the first two numbers in the version number, the period between them, and the last two numbers.
    • Square brackets are used to match on ranges of characters, so something like [a-zA-Z0-9] will match all alphanumeric characters, upper or lowercase. Something like [2-9] will match only the numbers 2 through 9.
    • Curly brackets are used to indicate quantifiers. By default using [0-9] will match one character between 0 and 9. If we do this instead: [0-9]{1,5} we will match between 1 and 5 characters between 0-9.
    • The pipe character is used for OR.

    So, back to our expression. Here is is tabbed out on multiple lines to make it more readable:

    Basically, we're saying:
    Match any alphanumeric character between 3 and 5 times, followed by a space and a v, THEN
    Match "02.26" through "02.29" OR
    Match "02.30" through "02.99" OR
    Match "03.00" through "99.99".

    The reason we are using [1-9][0-9] instead of [0-9]{2} is to prevent matching on 01 or 02 for the last capture group,
    since those would be lower versions and the numbers >= 02.26 are covered already by earlier capture groups.

    Also, there's no shame in using a regex tester like this: https://regex101.com/

    Throw a bunch of the version numbers from your environment in the text field at the bottom and play around with the regex syntax.

    1
  • For our site I just set up collections for each model we have in use with subcollections showing which of each model have the latest BIOS and which are running an older BIOS with an Inventory variable setup for each model's latest BIOS version. So each time a new BIOS is released I just go in and update the variable and all my collections update automatically.

    0