Regex with Application Version (MS Office)

New Contributor III

I am struggling real hard trying to parse out computers with different versions of Microsoft Office. I am using the attached search as a test. Every time I run this search it pulls the wrong info in two ways:
1. It returns all versions of Excel.
2. It returns any app with a matching version number.


I am using the solution from this post, which is similar to other supposed solutions on the board.


New Contributor III

if you're trying to bring everyone to a current version of MS, look at @talkingmoose's Regex Current Version or Higher Script to get the perfect Regex. At least it saves me so much time. You might be able to get it to work in other ways also.

Just open terminal and sh /path/to/script/<scriptName>.sh 1.23.4 it will spit out how the final Regex was created, then just pop that in Jamf and select "Does not match Regex." to find all older versions below what you are looking for.

New Contributor III

I don't think the regex is the problem. The search is reporting all installed apps within that version range, PLUS all installed versions of Excel. It's treating the search criteria as an OR search instead of an AND search:
Find all versions of 'Microsoft Excel'
Find all application titles with a version 'from 16.17 to 16.99'

I tried the above regex at, which seems to be matching the correct version numbers. I also tried the script your linked, which shot out this:


Which also passed the test at regex101.

Just for giggles, I tried flipping the search to OR, which did change the output. It was still reporting the wrong information, however. I'm starting to think this is a bug.