Posted on 04-21-2021 05:38 AM
Hi
Can someone help me with the value required for "matches regex" for an application version less than 2.13.210200
thanks
Posted on 04-21-2021 06:09 AM
post deleted since not correct.
Posted on 04-21-2021 10:28 AM
@user-OHTrLNQCsZ Take a look at https://github.com/moorereason/make_ge_version_regex/. It will create a regex that will match a specified version number or higher, and if you use "does not match regex" as the operator in your Smart Group it will match applications versions less than the specified version number.
Posted on 04-21-2021 10:32 AM
This Match Version Number of Higher.bash script from William Smith generates a regex for the version you specify or higher. The script generated the following regex:
^(d{2,}.*|[3-9].*|2.d{3,}.*|2.[2-9]d{1,}.*|2.1[4-9].*|2.13.d{7,}.*|2.13.[3-9]d{5,}.*|2.13.2[2-9]d{4,}.*|2.13.21[1-9]d{3,}.*|2.13.210[3-9]d{2,}.*|2.13.2102[1-9]d{1,}.*|2.13.21020[1-9].*|2.13.210200.*)$
In your group or search, you can set the value to does not match that regex.
Edit: I did not see @sdagley's post until after I posted this.
Posted on 04-21-2021 10:43 AM
@skeenan07 Great minds and all that :-) @hsucmoore created the make_ge_version_regexp.sh variant of William Smith's script in response to the Allow regex longer than 255 characters in Smart Group criteria Feature Request.
Posted on 04-22-2021 04:29 AM
Thanks alot everyone I will give it a try.
Posted on 04-22-2021 05:03 AM
@skeenan07 Well it "works"
The Smart Group also looks for the name of an .app (so is name of app) and does not match regex (as above) .
But when exporting to Excel it shows a multitude of different application names. Any thoughts?
09-21-2021 05:27 PM - edited 09-21-2021 05:36 PM
So many ways to skin the cat. My brain has an easier time when I first define the "desired state" version (2.13.210200), and create the regex in a way that covers that version and higher. This way I can use "Does not match regex", where the regex covers the desired state and higher.
I use https://regex101.com to create the regex and test. Since regex analyzes a string, there's no need to check the entire version, just go from left to right, and stop when you've confirmed the portion of the string meets the requirements.
^(2\.13\.210[2-9]|2\.13\.21[1-9]|2\.13\.2[2-9]|2\.13\.[3-9]|2\.1[4-9]|2\.[2-9]|[3-9])